https://guarded-caverns-95243.herokuapp.com/
Create an account to have access to the home page and the different tests
Link to download NodeJS: https://nodejs.org/en/
Command npm install
to install the different packages (express, body-parser...)
Command node app.js
to launch server
Before each test (fileName: Game), the user has the possibility to try some example (fileName: trainingGameName).
The order and the examples can be modified in the file "app.js"
Variables "testName" show if the test has already been done or not
To add another game and store the relative data, you should create a new mongoose.Schema (or use an existing schema if it's the same schema as one of the other test)
All data are stored using MongoDB Atlas
-
Create a new account on https://account.mongodb.com/account/register
-
Create a new cluster
In our project we used:
- AWS and N.Virgina as Cloud provider & Region
- M0 as a cluster Tier
-
Add a new MongoDB user (Atlas admin)
-
IP whitelist Allow access from anywhere
-
Once the cluster has been set up:
- Connect to the cluster
- Connect to the mongo Shell (1: download it 2: select version)
- Copy the url "mongodb+srv://username:[email protected]/databasename" and replace username, password, databasename by your own ones --> This link will be used in the app.js (mongoose.connect("link", {useNewUrlParser: true, useUnifiedTopology: true});)
- To create the database click on collections --> create database
The website is deployed using heroku
- Create a new account on https://signup.heroku.com/login
- Install heroku and start using the heroku command from your command shell --> "Heroku Node.js Documentation" https://devcenter.heroku.com/articles/getting-started-with-nodejs