Skip to content

alipadmanegara/ccw-2020-data-caching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccw-2020-data-caching

Data caching using Redis and NodeJs

Requirement:
• Node.js should be installed on your system
• MongoDB should be installed on your system
• Redis should be installed on your system

Running in local

Install the dependencies.

$ npm install

Start the server.

$ npm run start

Endpoints

• Insert data to DB

method = POST
url = http://localhost:3000/api/user-data
body = {
          "userId": "johnDoe",
          "accountNumber": "12345",  
          "accountName": "tabungan rumah"
       }

• Find data (case 1), direct call to db, no caching

method = GET
url = http://localhost:3000/api/user-data/user-id/johndoe/case-1

• Find data (case 2), direct call to db, slow response time

method = GET
url = http://localhost:3000/api/user-data/user-id/johndoe/case-2

• Find data (case 3), db slow response time but added caching

method = GET
url = http://localhost:3000/api/user-data/user-id/johndoe/case-3

About

Data caching using Redis and NodeJs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published