forked from mozilla/BrowserQuest
-
Notifications
You must be signed in to change notification settings - Fork 4
Initial setup
jessykate edited this page Aug 21, 2012
·
2 revisions
If you are going to make changes on the project you will probably need to run ParticleQuest locally. In this page are gathered all steps to get it working.
- Clone the repository.
- Make sure you have Node.js and npm installed. http://nodejs.org/#download
- Install the dependencies listed in package.json. They can be installed running from the top level directory:
$ npm install -d
- Edit /server/config.json to reflect the port on which the server will run. 8000 will work just fine.
- Leave "metrics_enabled": false. Otherwise you would get the error: ERROR uncaughtException: Error: connect ECONNREFUSED.
- Run from the top level directory:
$ node server/js/main.js
- Go to /client/config/
-
$ cp config_build.json-dist config_build.json, edit for correct host:port. Eg. "127.0.0.1" (in quotes) and 8000 (not in quotes) (*) -
$ cp config_local.json-dist config_local.json, edit for correct host:port. Eg. "127.0.0.1" (in quotes) and 8000 (not in quotes) (*) - Start an http server in the /client/ directory. Eg. to use python's build in http server, type:
$ python -m SimpleHTTPServer 8080 - Finally visit localhost:client_port (eg. http://localhost:8080) from your browser to view index.html.
- (*) Host needs to be an IP or domain (**). Eg. for localhost, you need to use "127.0.0.1". "localhost" caused an error connecting to the server.
- (**) If you have a proper domain, don't prefix it with http:// - Eg. particlequest.com, not http://particlequest.com.