This is a simple CRUD API with NodeJS, MongoDB, and REDIS.
You can install NodeJS by downloading the latest binaries for your desired operating system from their official download page.
you can install redis uning homebrew.
run brew install redis
in terminal to install redis on your mac using homebrew, assuming you have homebrew installed.
You can learn how to install redis on Linux here
You can learn how to install redis on Windows here
- clone the repo
- change directory
- run
npm install
- run
npm i --S redis express mongodb mongoose body-parser
- run
node app.js
- visit http://localhost:3000
The API expect the following Parameters:
userName
of type string
accountNumber
of type number
emailAddress
of type string
identityNumber
of type number
Make sure post is set to raw and JSON
- add user (POST):
/users
- delete user (DELETE):
/users/{id}
- get all user (GET):
/users
- get a user by account number (GET):
/users/accNum/{accountnumber}
- get a user by identity number (GET):
/users/accNum/{identitytnumber}
- update a user (PUT):
/users/{id}