DemGames - Debate
A full stack (MERN) app that helps users learn how to debate effectively.
⚠️ IN DEV. Currently three modules and its levels are available.
Table of Contents
This app is built with React (frontend), Express.js (backend) and Node.js.
The app connects to a mock api in express and gets the complete game data and renders all modules. To add more modules , levels or questions you need to edit the moduleData.json file inside data directory.
Clone this repository to your local machine (using SSH):
$ Create a new directory , open terminal and run follwing commands in it. $ git init $ git remote add upstream https://github.com/nditech/demgames-debate.git $ git pull upstream hashedin $ npm install $ npm start
If the app is run for the first time, there won't be any modules. You need to run express server to fetch game data. Open a new terminal and move to main directory and run the below command.
$ nodemon server/server.js
// Backend error: Error: listen EADDRINUSE: address already in use :::9000 You need to kill port 9000 $ sudo fuser -k 9000/tcp
//Frontend Error: Error: Access to fetch at 'http://localhost:9000/api/game' from origin 'http://localhost:8083' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Fix: You need to install cors extension in google chrome to enable cross-origin resource sharing.
- Please read our Code Commits Guide and Documentation Guide.
- Do your own unit test before committing code.
- Jatin Narang