- GET /users?limit=0&offset=10 - Get list of all users (paginated)
- GET /users/:id - Get user by id
- GET /users/:id/friends?limit=0&offset=10 - Get user friends (paginated)
Where limit is the number of records to be fetched and offset is the page number.
User model contains:
- id (Auto Increment - Seed)
- firstName
- lastName
- avatar
- Express
- Jest
- Eslint
- mysql2
- Supertest
-
npm install
-
Populate api/db/config with database details
-
Create a .env file at the root level of the project with following values: 3.1 NODE_ENV= 3.2 PORT=
-
npm run start
[Note]: If .env file is skipped node will default to 'development' and 8080 as values for the same.
- npm run lint (see lint erros)
- npm run lint-fix (fix potentially fixable)
- npm run test