by @jesielviana
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
- Clone of this repository:
git clone https://github.com/jesielviana/nodejs-express-sequelize.git
; - Enter the nodejs-express-sequelize folder:
cd nodejs-express-sequelize
; - Run yarn to install dependencies:
yarn
; - Config database credentials inside
/src/config/database.js
; - Create database, run
yarn sequelize db:create to create the database
; - Run
yarn dev
to start the server.
- 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
- https://leanpub.com/construindo-apis-testaveis-com-nodejs
- http://expressjs.com/pt-br/
- Introduction to Express, a practical tutorial
- Bulletproof node.js project architecture
- Node.js Architecture and 12 Best Practices for Node.js Development | Scout APM Blog
- Melhores Práticas em Node.js
- https://jestjs.io/pt-BR/
Repository link of a frontend example that integrates with this API: https://github.com/jesielviana/frontend-ifpi-curso-nodejs