keenethics / node-react-starter-kit

MIT License
0 stars 1 forks source link

Backend structure investigations #6

Closed maryna-yanul closed 5 years ago

OksentukVlad commented 5 years ago

Express: https://expressjs.com/en/starter/generator.html https://medium.com/codebase/structure-of-a-nodejs-api-project-cdecb46ef3f8 https://codeburst.io/fractal-a-nodejs-app-structure-for-infinite-scale-d74dda57ee11

Nestjs: https://nestjs.com/ https://blog.exceptionfound.com/index.php/2018/06/07/nestjs-basic-auth-and-sessions/

Other frameworks to consider: Koa2, Hapi, SailsJS, Meteor =)

Frankly, I'd love to look at other languages than JS for back-end. (E.g. Elixir, Go, Rust, Kotlin)

epaminond commented 5 years ago

Nest.js has official authentication tutorial: https://docs.nestjs.com/techniques/authentication It uses https://github.com/typeorm/typeorm by default.

epaminond commented 5 years ago

It looks like Express is the way to go.

  1. File-structure
  2. REST or GraphQL
  3. Websockets example
  4. 1 or separate repositories
  5. Do we need transpiling
epaminond commented 5 years ago

My thoughts:

REST or GraphQL

REST - it's simpler.

Websockets example

We can do that but that's not critical to finish initial template.

1 or separate repositories

I'd wrote for 1 repo and single command to start the project - this simplifies deployment.

Do we need transpiling

I don't think we need that except for imports which is going to be added to node engine anyway.

epaminond commented 5 years ago

Decided to use Postgres by default.

epaminond commented 5 years ago

Which ORM to use? knex / sequelize / TypeORM Do we need Swagger added?