Skip to content

jesielviana/nodejs-express-sequelize

Repository files navigation

Node.js project with Express, Sequelize, Jest and Postgres

by @jesielviana

Directory structure

src
  ├── app.js         app entry point
  ├── /routes        controller layer: api routes
  ├── /config        config settings
  ├── /services      service layer: business logic
  ├── /models        data access layer: database models	
test       
  ├── /unit          unit test suites
  ├── /integration   test api routes

Installation and execution

  1. Clone of this repository: git clone https://github.com/jesielviana/nodejs-express-sequelize.git;
  2. Enter the nodejs-express-sequelize folder: cd nodejs-express-sequelize;
  3. Run yarn to install dependencies: yarn;
  4. Config database credentials inside /src/config/database.js;
  5. Create database, run yarn sequelize db:create to create the database;
  6. Run yarn dev to start the server.

API

  • Sign-up: http://localhost:3000/api/auth/signup
  • Login: http://localhost:3000/api/auth/signin
  • Courses: http://localhost:3000/api/courses
  • Users: http://localhost:3000/api/users
  • Students: http://localhost:3000/api/students

References


Repository link of a frontend example that integrates with this API: https://github.com/jesielviana/frontend-ifpi-curso-nodejs

About

Exemplo de Projeto Node.js com Express, Sequelize e Postgres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published