git clone https://github.com/amilcarcattaneo/kvs-node.git
cd kvs-node
npm install
npm run dev
- GET 'http://localhost:8000/key/test' header 'Content-Type: application/json'
- Status Code:
- 200: if the key has a value.
- 400: if the key param is undefined or contains only white spaces.
- 404: if the key doesn’t have a value.
curl --location --request GET 'http://localhost:8000/key/test' \
--header 'Content-Type: application/json'
- POST 'http://localhost:8000/key' header 'Content-Type: application/json'
- Status Code:
- 201: if the key value pair was accepted.
- 400: if the key or the value are undefined or contains only white spaces.
curl --location --request POST 'http://localhost:8000/key' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "test",
"value": "test"
}'
- NodeJS: Node.js · GitHub
- Express for routing and start a server: GitHub - expressjs/express: Fast, unopinionated, minimalist web framework for node.
- Mongoose to handle MongoDB: GitHub - Automattic/mongoose: MongoDB object modeling designed to work in an asynchronous environment.
- NextJS: NextJS · GitHub
- Web