This is a web application or API built using Node.js and the Express.js framework. It is based on MVC (Model View Controller.) The app presents a dice game.
To get started with the application, follow these steps:
-
Clone the repository to your local machine.
-
Install the required dependencies by running the following command:
npm install
-
Build the application using TypeScript by running:
npm run build
- Access the front-end of the application at this url: http://localhost:3000/front.html
- Go to front.html.
- Create your player using the form. If the player is created correctly, a message will appear confirming it.
- Take the id of your created player. Type that id in the "Enter player's ID to get a player's games" field.
- hit the "Roll dice!" button.
- There are 2 dice. You must get 7 to win, otherwise you lose.
The results of your game will appear on the screen.
Have fun!
-
Install the required dependencies by running the following command:
npm run dev
-
Application start
npm start
-
Tests
npm test
- Routes are defined in server/routes/routes.ts
Click on Postman to check the routes
- Check my package.json
The app connects to the mySql database. The configuration of this connection can be found in ... We have used Sequelize for the ORM
