- node.js
- express
- knex
- sqlite3
- pg
- jsonwebtoken
- nodemon
- dotenv
- supertest
- jest
| field |
data type |
metadata |
| id |
unsigned integer |
primary key, auto-increments, generated by database |
| username |
string |
required, unique |
| password |
string |
required |
| location |
string |
required |
| avatarUrl |
string |
required |
GET /api/user/:id - takes an id and returns the account associated with it
POST /api/user/register - creates an account
POST /api/user/login - login
DELETE /api/user/:id - takes user id and removes it from the database
PUT /api/user/:id - takes user id and changes object and updates the id specified
| field |
data type |
metadata |
| id |
unsigned integer |
primary key, auto-increments, generated by database |
| name |
string |
required, unique |
| region |
string |
required |
GET /api/exercises - gets a list of all the exercises
GET /api/exercises/users/:id - gets all exercises created by that user id
GET /api/exercises/:id - gets a single exercise
GET /api/exercises/regions/:region - gets all exercises for a certain region
POST /api/exercises - adds a new exercise
PUT /api/exercises/:id - can update an exercise
DELETE /api/exercises/:id - deletes a single exercise
{
"name": "Pull Ups",
"region": "arms"
}