This API server listens for HTTP REST requests.
The server will accept the JSON payload and store it locally in the server.
-
git clone https://github.com/EdkChow/sparkpost-technical.git
-
cd sparkpost-technical
-
Start the server:
npm install
node server/server.js
OR using Docker example below:
docker build --tag sparkpost-technical:1.0 .
docker run --publish 8000:8000 sparkpost-technical:1.0
-
Use an API client to test the server endpoints, such as Postman
- name [string]
- name of the user
- age [number]
- age of the user
{ "name": "x", "age": 4 }
- POST /sparkpost
- PUT /sparkpost/:id
- GET /sparkpost/:id