Introduction to node from Pluralsight
- clone project;
npm i
npm start
(for start mongod, create db, seed, start server at default port: 3000)- Optional:
npm seed
(make db and seed mock data, port:27017
(mongo default, or can be changed insrc/config.js
))npm run dev
(for development, default port: 3000)npm test
- POST:
http://localhost:{port}/auth/register
-> req: { email: 'email', password: 'password' } -> res: email and status_code: 200 - POST:
http://localhost:{port}/auth/sign_in
-> req: { email: 'email', password: 'password' } -> res: token(exp 5min) and status_code: 200
- GET:
http://localhost:{port}/api/practices
-> res: practices - GET:
http://localhost:{port}/api/practices/:practice_id
-> res: practice - GET:
http://localhost:{port}/api/practices/:practice_id/technologies?page=1&per=5
-> res: technsologies(page, per - optional) - GET:
http://localhost:{port}/api/practices/:practice_id/technologies/:technology_id
-> res: technsology