Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.64 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.64 KB

dyadic-minigrid

multiplayer game and chat for collecting data on human counterfactual explanations in a collaborative learning task.

environment setup

  • clone the repository with git glone
  • install npm sudo apt install npm (you can also follow one of these link npm installation ubuntu, npm installation mac)
  • enter the cloned folder and initialize it with npm init -y
  • install express and socket.io with npm install express socket.io
  • install nodemon with npm install nodemon --save-dev

dependencies setup on package.json

  • in package.json set the main script to server.js by modifying "main": "server.js"
  • make sure that the script type is "module" by adding "type": "module" (if the line "type" does not exist, add it after "main": "server.js"
  • set the start and dev scripts by adding "start": "node server.js", "dev": "nodemon server.js" before "test"

run the script

  • access the server folder and launch the script by typing npm run dev
  • the default project starts on http://localhost:3000/

database setup

  • install mongodb using npm install mongodb
  • install mongoose using pip install mongoose
  • important: comment the database code if you are running the code locally (i.e., remove import mongoose from server.js and import fs for saving on csv files