7uyhb # Project Name
Rally - Building A Distributed Network With Your Browser
- Development Team Members: Frank Lee, Edmund To, Leah Loversky, Clay Han
- Node 4.4.7
- PostgreSQL
Install all npm dependencies.
npm install
Download/launch Postgres app and create a database named 'rally' http://postgresapp.com/
open psql
CREATE DATABASE rally;
Create client/src/environment/ folder with a file called environment.js. Add the following code to environment.js, replacing empty strings with firebase config variables:
const ENV = {
apiKey: '',
authDomain: '',
databaseURL: '',
storageBucket: ''
};
export { ENV };
Initiate webpack.
npm run build: dev
Initiate nodemon.
npm start
OPTIONAL: Run Webpack and Nodemon at once:
npm run build:start
- To add new tests, create a file containing your tests in 'client/src/tests/' with the suffix '-test' (see existing files for examples)
- To execute tests, run 'npm test' from the command line
- Note: Karma will launch and close Chrome each time you run the tests; this typically takes about 10 seconds. If you'd like Chrome to stay open, change the 'singleRun' option to false in karma.conf.js
- Socket event handlers for server:
- 'disconnect': user disconnected its socket connection
- 'userReady': user is ready to receive Job
- 'userDisconnect': user leaves a project
- 'userJobDone': user sent back a finished Job
- 'createProject': need to instantiate a new Project
- 'getAllProjects': user is requesting list of all Projects
- 'error'
- Socket event handlers for client:
- 'newJob': received new Job from server
- 'updateWorkers': received list of all workers
- 'updateResults': received array of all results so far
- 'finalResult': Project has concluded and received final result
- 'allProjects': received a list of all project IDs from server