Add, edit, and remove users, divisions, and titles.
- Clone the repo
git clone https://github.com/nightwolfdev/users.git
- Navigate to the project folder
cd users
- Install dependencies
npm install
- Run both the api and app
npm start
- Saving changes to either the apis or app will automatically refresh when
npm start
is initially run.
After running npm start
, the app will automatically open at http://localhost:4200
.
After running npm start
, the api server will be available at http://localhost:9000
.
Method | Endpoint | Description |
---|---|---|
GET | /divisions | Get all divisions |
GET | /divisions/:id | Get a specific division by id |
PATCH | /divisions/:id | Update a specific division by id |
POST | /divisions | Add a new division |
Method | Endpoint | Description |
---|---|---|
GET | /titles | Get all titles |
GET | /titles/:id | Get a specific title by id |
PATCH | /titles/:id | Update a specific title by id |
POST | /titles | Add a new title |
Method | Endpoint | Description |
---|---|---|
DELETE | /users/:id | Delete a specific user by id |
GET | /users | Get all users |
GET | /users/:id | Get a specific user by id |
PATCH | /users/:id | Update a specific user by id |
POST | /users | Add a new user |
After running npm start
, if no database file exists, one will be created automatically called data.db
.
Create a copy of the data-sample.db
file and rename it to data.db
.
If you want to delete existing data, delete the data.db
file. You can start over with no data or existing data.