This Node.js REST API manages students in a JavaScript array. The data resets each time the server restarts.
npm install
npm run devOpen http://localhost:3000/api/v1/health to confirm that it is running.
| Method | URL | Description |
|---|---|---|
| POST | /api/v1/students |
Create a student |
| GET | /api/v1/students |
Get all students |
| GET | /api/v1/students/:id |
Get one student |
| PATCH | /api/v1/students/:id |
Update a student |
| DELETE | /api/v1/students/:id |
Delete a student |
Use this JSON body when creating a student:
{
"name": "Ada Okafor",
"email": "ada@example.com",
"course": "Node.js",
"age": 22
}