<commit_before># Project Name

> Rally - Building A Distributed Network With Your Browser


## Table of Contents

1. [Requirements](#requirements)
1. [Development](#development)
    1. [Installing Dependencies](#installing-dependencies)
1. [Team](#team)
1. [Notes for Development Team](#notes-for-development-team)

## Team

  - Development Team Members: <NAME>, <NAME>, <NAME>, <NAME>

## Requirements

- Node 4.4.7
- PostgreSQL or MySQL

### Installing Dependencies

Install all npm dependencies.
```sh
npm install
```

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:
```sh
const ENV = {
  apiKey: '',
  authDomain: '',
  databaseURL: '',
  storageBucket: ''
};

export { ENV };
```

Initiate webpack.
```sh
npm run build: dev
```

Create database named 'rally' using mysql as root user:
mysql -u root -p
create database rally

Open the server with Nodemon.
```sh
npm start
```

## Testing

1. To add new tests, create a file containing your tests in 'client/src/tests/' 
   with the suffix '-test' (see existing files for examples)
2. To execute tests, run 'npm test' from the command line
3. 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

## Notes for Development Team

1. 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'

2. Socket event handlers for client:
  - 'newJob': received new Job from server
  - 'updateWorkers': received list of all workers<commit_msg>Update readme with instructions for database setup<commit_after># Project Name

> Rally - Building A Distributed Network With Your Browser


## Table of Contents

1. [Requirements](#requirements)
1. [Development](#development)
    1. [Installing Dependencies](#installing-dependencies)
1. [Team](#team)
1. [Notes for Development Team](#notes-for-development-team)

## Team

  - Development Team Members: <NAME>, <NAME>, <NAME>, <NAME>

## Requirements

- Node 4.4.7
- PostgreSQL or MySQL

### Installing Dependencies

Install all npm dependencies.
```sh
npm install
```

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:
```sh
const ENV = {
  apiKey: '',
  authDomain: '',
  databaseURL: '',
  storageBucket: ''
};

export { ENV };
```

Initiate webpack.
```sh
npm run build: dev
```

Launch mysql server and create a database named 'rally' using mysql as the root user:
mysql start
mysql -u root -p
create database rally;

Open the server with Nodemon.
```sh
npm start
```

## Testing

1. To add new tests, create a file containing your tests in 'client/src/tests/' 
   with the suffix '-test' (see existing files for examples)
2. To execute tests, run 'npm test' from the command line
3. 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

## Notes for Development Team

1. 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'

2. Socket event handlers for client:
  - 'newJob': received new Job from server
  - 'updateWorkers': received list of all workers
{'fraction_non_alphanumeric': 0.09910134797803295, 'fraction_numerical': 0.0074887668497254116, 'mean_word_length': 4.015018773466833, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6140614', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1121, 'n_words': 513}