Skip to content

ShijithDAC/MockServer

Repository files navigation

1) Enabled the eslint and jshint for ES6 code in Express Framework

2) Configured www according to the enviroment to pick the env files
---> "nodemon bin/www -dev" to pick dev env variables
---> "nodemon bin/www -prod" to pick prod env variables
---> "nodemon bin/www" to pick default dev env variables

3) Enabled the Redis cache
---> Download and install redis-server
---> Run on seprate port "redis-server --port <PORTNO>"
---> Run redis-cli like "redis-cli -p <PORTNO>"

4) Enabled Winston Logger service configured in config

5) Enabled Session and Cookie handler for the Express App for the redis port 9090 dev env, yet to do for the prod.
    Here the Session id will be encrypted and stored in redis memory

    GET / -----> Will ask to redirect to /mock with credentials
    POST /mock -----> will be authorised and password to be checked in DB (pending) and the username will be saved in the session.
    GET /logout -----> created session will be destoyed and you will no more able to access the GET / data until you do  POST /mock.

6) Handled the 404 route in app.js. 

7) Added the Validators and Success format Message in ../helpers and tested in ../routes/index.js for the /testValidators route

Releases

No releases published

Packages

No packages published

Languages