*DemTool*: An impactful gaming platform that complements assessment tools around civic and voter education principles for youth, focusing on scalability and fun.
Branch: hashedin
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
client
data/Module
public
server
.babelrc
.gitignore
README.md
package-lock.json
package.json
webpack.config.js

README.md

NDI Logo

DemGames - Debate

License mongodb express react node

Documentation - License - Author(s)

A full stack (MERN) app that helps users learn how to debate effectively.

Documentation

⚠️ IN DEV. Currently three modules and its levels are available.

Table of Contents

  1. Intro
  2. Demo
  3. Installation
  4. Diagnosis
  5. Test
  6. Contribution

Intro

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.

Installation

Make sure you have Git, Node.js and npm on your machine.

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

Diagnosis

// 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.

Contribution

License

GNU General Public License v3.0

Author(s)

⬆ back to top