Skip to content

shamnadps/NetEnt_GameServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Simple NodeJS Server with express for NetEnt Game Framework sample

Install

  • Install NodeJS
  • Clone the repository to local.
  • Install libraries: npm install
  • Run: npm start

By the default the server listens on port 1337.

How to use

This is very simple game server using NodeJS

  • Only one API is exposed /casino

This returns

  1. Random generated number array of size 3.
  2. A Bonus feature capability determined by flags true or false.
  3. Result of the game determined as Big Win!!! , Small Win!, No Win..
  • Big Win!!! - When all the random generated numbers are equal.
  • Small Win!! - When only two of the random generated numbers are equal.
  • No Win! - When none of the random generated numbers are equal.

Sample Response

A Sample response would look like this.

[{"values":[1,1,5]},{"bonus":false},{"result":"Small Win"}]

Code Styling and Intendation

JavaScript Standard Style is been used for styling and intendation.

  • Run npm test

This executes standard --fix from package.json scripts

Unit Testing

Unit Testing is enabled using mocha and chai.

  • Run: npm test

This executes npm run-script prepare-test && standard --fix && mocha test/out/**spec.js from package.json scripts

  • prepare-test does the es6 to es5 conversion.
  • mocha is used for unit testing.

Bug Reporting

Feel free to report any bugs. I will be more than happy to fix them right away.

About

A Simple Game Server using Nodejs ES6 and express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published