Skip to content

Repository files navigation

webGame

A simple jwt based mock authentication in nodeJs as well as poker game. Demo

Installation

This is a Node.js based application.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

Once node installation is done.

Download or clone the project:

$ https://github.com/shubhamV123/webGame.git
Note: change directory to webGame before going further installation.

Install dependencies:

$ npm install

Start the server:

If you have installed nodemon then simply type:

$ nodemon

Find more information about nodemon nodemon.

Or else simply type:

$ node index.js

Login Credentials

Since it is a mock authentication. You can either use any of these credentials for login:

name: 'john123',                   
password: '12345'                           

or

name: 'test',
password: 'test                           

Logging/Monitoring

This app is centralized with logging system.This app uses simple and universal logging library i.e winston.So just dont use console.log as it would not be benficial for debugging/monitoring your application.This app logs all your logging action which you want and it also saves your logs for future reference.Besides this it generate two log files: One contain all logs and another contain only error logs.

More information you can find here

Dockerizing this web app

To know more information about how to get a Node.js application into a Docker container.Follow this link. As this app contain docker file you can build your docker image and run this image in docker container. To build docker image of this:

docker build -t node-web-app(or any name which your want) .                         

To run this docker image:

docker run -p 8081:3000 -d node-web-app((or name which you set))                         
Note: If docker gives error during any phase try to run as sudo access.

Test Suite

This app uses mocha and chai to generate test cases and istanbul for code coverage. To run test suite:

$ npm test or mocha                        

To run code coverage:

$ npm run coverage                        

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages