Giter Site home page Giter Site logo

masb0ymas / expresso-sequelize Goto Github PK

View Code? Open in Web Editor NEW
139.0 6.0 47.0 8.59 MB

expresso with Sequelize

Home Page: https://expresso.masb0ymas.com

License: MIT License

JavaScript 15.16% TypeScript 71.17% Dockerfile 0.99% HTML 12.68%
typescript sequelize-orm expressjs expresso husky nodejs sequelize-typescript swc

expresso-sequelize's Introduction

expresso with Sequelize

documentation maintenance License: MIT

version Express Node Eslint TypeScript Docker

Feature

Steps to run this project:

  1. Clone this repository
  2. Duplicate .env.example to .env
  3. Setup database settings inside .env file
  4. Create your database ( manual ) or run yarn db:create && yarn db:reset
  5. Run yarn dev command
  6. Run watch command yarn dev:watch
  7. Release your app for Production or Staging with yarn release
  8. Build your code with Docker docker build -t yourname/express:v1.0.0 .
  9. Run with docker image docker run -p 7000:8000 -d yourname/express:v1.0.0

Author

masb0ymas (Resume)

Github Twitter Linkedin

Support Me

ko-fi

expresso-sequelize's People

Contributors

chornos13 avatar dependabot-preview[bot] avatar dependabot[bot] avatar masb0ymas avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

expresso-sequelize's Issues

APi usage

Can this be used for restful apis?

Create user - 500 error

Hi,

I'm testing your code and when I try to create the first user I get this:

error: 500 - data and salt arguments required - /v1/auth/sign-up - POST - ::1

The endpoint I'm using is: /v1/auth/sign-up

The body I'm passing on Postman is:

{
    "fullName": "bla bla bla",
    "phone": "777-777-7777",
    "email": "[email protected]",
    "password": "12345678912"
}

Is there anything missing on the request? I haven't configured SMTP or anything else yet.

Thank you.

HTTPS support

Hi,
Is there any plan for creating https server?
Thanks

Cannot parse array query

Hi,

I am trying to parse a array query , url below:

http://localhost:7000/v1/strategies?collectionIds[1]=c&collectionIds[0]=b

But collectionIds is being parsed as string with value c. How would i get array since req.query already returns the parsed query in Expresson?

Yarn start giving ENOTDIR error

Hello
I am trying to setup the project, i have run the initial commands and i can run yarn dev but it doesn't recompile the project on save.. i tried running yarn start and its following error in log file:

{"date":"Sat Jun 25 2022 23:17:58 GMT+0500 (Pakistan Standard Time)","error":{"code":"ENOTDIR","errno":-20,"path":"/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts","syscall":"scandir"},"exception":true,"level":"error","message":"uncaughtException: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\nError: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","os":{"loadavg":[7.0048828125,5.9521484375,4.70703125],"uptime":86282},"process":{"argv":["/Users/apple/Desktop/Project/backend/node_modules/.bin/ts-node","/Users/apple/Desktop/Project/backend/src/server.ts"],"cwd":"/Users/apple/Desktop/Project/backend","execPath":"/usr/local/bin/node","gid":20,"memoryUsage":{"arrayBuffers":2445938,"external":4078668,"heapTotal":325046272,"heapUsed":296024200,"rss":403922944},"pid":5757,"uid":501,"version":"v16.13.0"},"stack":"Error: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","trace":[{"column":3,"file":"node:fs","function":"Object.readdirSync","line":1390,"method":"readdirSync","native":false},{"column":14,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":30,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":30,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":21,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":35,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":"getRoutes","line":12,"method":null,"native":false},{"column":10,"file":"/Users/apple/Desktop/Project/backend/src/routes/v1.ts","function":null,"line":12,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1101,"method":"_compile","native":false},{"column":23,"file":"/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts","function":"Module.m._compile","line":1597,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1153,"method":".js","native":false}]}
{"date":"Sat Jun 25 2022 23:18:33 GMT+0500 (Pakistan Standard Time)","error":{"code":"ENOTDIR","errno":-20,"path":"/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts","syscall":"scandir"},"exception":true,"level":"error","message":"uncaughtException: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\nError: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","os":{"loadavg":[6.76904296875,5.9921875,4.76953125],"uptime":86317},"process":{"argv":["/Users/apple/Desktop/Project/backend/node_modules/.bin/ts-node","/Users/apple/Desktop/Project/backend/src/server.ts"],"cwd":"/Users/apple/Desktop/Project/backend","execPath":"/usr/local/bin/node","gid":20,"memoryUsage":{"arrayBuffers":2445938,"external":4078668,"heapTotal":324452352,"heapUsed":296550656,"rss":396234752},"pid":5788,"uid":501,"version":"v16.13.0"},"stack":"Error: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","trace":[{"column":3,"file":"node:fs","function":"Object.readdirSync","line":1390,"method":"readdirSync","native":false},{"column":14,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":30,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":30,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":21,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":35,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":"getRoutes","line":12,"method":null,"native":false},{"column":10,"file":"/Users/apple/Desktop/Project/backend/src/routes/v1.ts","function":null,"line":12,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1101,"method":"_compile","native":false},{"column":23,"file":"/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts","function":"Module.m._compile","line":1597,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1153,"method":".js","native":false}]}
{"date":"Sat Jun 25 2022 23:29:39 GMT+0500 (Pakistan Standard Time)","error":{"code":"ENOTDIR","errno":-20,"path":"/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts","syscall":"scandir"},"exception":true,"level":"error","message":"uncaughtException: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\nError: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","os":{"loadavg":[5.36181640625,4.1240234375,4.25244140625],"uptime":86983},"process":{"argv":["/Users/apple/Desktop/Project/backend/node_modules/.bin/ts-node","/Users/apple/Desktop/Project/backend/src/server.ts"],"cwd":"/Users/apple/Desktop/Project/backend","execPath":"/usr/local/bin/node","gid":20,"memoryUsage":{"arrayBuffers":2454130,"external":4086860,"heapTotal":324714496,"heapUsed":296578768,"rss":401838080},"pid":6006,"uid":501,"version":"v16.13.0"},"stack":"Error: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","trace":[{"column":3,"file":"node:fs","function":"Object.readdirSync","line":1390,"method":"readdirSync","native":false},{"column":14,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":30,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":30,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":21,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":35,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":"getRoutes","line":12,"method":null,"native":false},{"column":10,"file":"/Users/apple/Desktop/Project/backend/src/routes/v1.ts","function":null,"line":12,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1101,"method":"_compile","native":false},{"column":23,"file":"/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts","function":"Module.m._compile","line":1597,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1153,"method":".js","native":false}]}
{"date":"Sat Jun 25 2022 23:29:55 GMT+0500 (Pakistan Standard Time)","error":{"code":"ENOTDIR","errno":-20,"path":"/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts","syscall":"scandir"},"exception":true,"level":"error","message":"uncaughtException: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\nError: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","os":{"loadavg":[7.20068359375,4.630859375,4.4306640625],"uptime":86999},"process":{"argv":["/Users/apple/Desktop/Project/backend/node_modules/.bin/ts-node","/Users/apple/Desktop/Project/backend/src/server.ts"],"cwd":"/Users/apple/Desktop/Project/backend","execPath":"/usr/local/bin/node","gid":20,"memoryUsage":{"arrayBuffers":2454130,"external":4086860,"heapTotal":325308416,"heapUsed":296331376,"rss":399790080},"pid":6028,"uid":501,"version":"v16.13.0"},"stack":"Error: ENOTDIR: not a directory, scandir '/Users/apple/Desktop/Project/backend/src/controllers/Auth/controller.ts'\n    at Object.readdirSync (node:fs:1390:3)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:30:14\n    at Array.forEach (<anonymous>)\n    at /Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:21:30\n    at Array.forEach (<anonymous>)\n    at getRoutes (/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts:12:35)\n    at Object.<anonymous> (/Users/apple/Desktop/Project/backend/src/routes/v1.ts:12:10)\n    at Module._compile (node:internal/modules/cjs/loader:1101:14)\n    at Module.m._compile (/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts:1597:23)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)","trace":[{"column":3,"file":"node:fs","function":"Object.readdirSync","line":1390,"method":"readdirSync","native":false},{"column":14,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":30,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":30,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":null,"line":21,"method":null,"native":false},{"column":null,"file":null,"function":"Array.forEach","line":null,"method":"forEach","native":false},{"column":35,"file":"/Users/apple/Desktop/Project/backend/src/@expresso/helpers/Routing.ts","function":"getRoutes","line":12,"method":null,"native":false},{"column":10,"file":"/Users/apple/Desktop/Project/backend/src/routes/v1.ts","function":null,"line":12,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1101,"method":"_compile","native":false},{"column":23,"file":"/Users/apple/Desktop/Project/backend/node_modules/ts-node/src/index.ts","function":"Module.m._compile","line":1597,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1153,"method":".js","native":false}]}

and its say clean exit in console.

is there any thing i am doing wrong here?

Ask

Is there any kind of CLI to generate things like services, schemas, controllers, and entities? Or do they all need to be added manually?

If it's done manually, which one needs to be added first, the entity or the schema?
Could you explain the sequence? Sorry, I'm new to development using Express.

Thank you, Mas N. Fajri.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.