Skip to content

shouryadey/DataSutram_challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1) The project is done using Node.js framework Express.js


2) Installation:

i) Install Node.js

If required , install the modules express,router, body-parser,jsonwebtoken,uuid, nodemon,moment in the root directory
    npm install express  router body-parser jsonwebtoken uuid nodemon moment express-validator

3) Services:

There are two services:

i) GET API call to generate JWT key,given the username and password of user in the body of request. To generate JWT key , jsonwebtoken module is used (implementation details are in controller directory)

ii) GET API call to generate user ID, given username , password , dateofbirth , name of user in the body of the request.To generate user_ID , uuid module has been used (implementation details are in controller directory)


4) Validations:

Validations are done in the middleware functions located in the helper/index.js

i) For username ,password and name validations are done using express-validator module

ii) For date ,validation is done using moment.js


5) Running the service:

i) Locate to the root directory i.e. DataSutram_challenge

ii) Open terminal and execute:

     $ nodemon app
At successful connection and running of service ,the response will be as:
     nodemon] 1.18.11
     [nodemon] to restart at any time, enter `rs`
     [nodemon] watching: *.*
     [nodemon] starting `node app.js`
     CONNECTED TO PORT NO=3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published