npm i -g sequelize-cli
# or
yarn global add sequelize-clisequelize db:create- Install local dependencies:
npm i # or yarn - Edit
.env
Without migrations
npm start
# or
yarn startWithout migrations
sequelize db:migrate
npm start
# or
yarn startAccess API server by opening http://localhost:8000
/users
| Endpoint | HTTP | Description | Body |
|---|---|---|---|
/users/ |
GET | Get all users | - |
/users/:userId |
GET | Get user by id | - |
/users/:userId |
PATCH | Update user by id | name, age |
/users/:userId |
DELETE | DELETE user by id |
/auth
| Endpoint | HTTP | Description | Body |
|---|---|---|---|
/signup/ |
POST | Register new account | name, age, email, password |
/signin/ |
POST | Login registered account | email, password |