<commit_before>## Deployment to Heroku

### Heroku account setup:
- Create a heroku account
- Create new heroku app
- Install heroku tool-belt

### mLab database setup 
- Create mLab account
- Create database
- Get MongoDB URI

### Stonecutter set up
- Deploy a Stonecutter instance, as found at `https://github.com/d-cent/stonecutter`
- Login as an admin
- Navigate to Apps page
- Add an app for your Mooncake instance
- Get client ID and secret, as generated by Stonecutter 

### Local Heroku configuration:
- Clone the repository: `git clone https://github.com/d-cent/mooncake.git`
- Log in to your Heroku account: `heroku login`
- Add Heroku remote: `heroku git:remote -a [APP_NAME]`
- Set buildpacks: 

        heroku buildpacks:set heroku/nodejs
        heroku buildpacks:add heroku/clojure

- Set Config Vars on Heroku
  - BASE_URL = [app uri]
  - AUTH_URL = [Stonecutter url]
  - CLIENT_ID = [Stonecutter client id]
  - CLIENT_SECRET = [Stonecutter client secret]
  - MONGO_URI = [MongoDB URI from mLab]
  - HOST = 0.0.0.0
- Update, add and commit the resources/activity-sources.yml file

- Push to Heroku<commit_msg>AW + FM | 380 | Update to readme for heroku deployment<commit_after>## Deployment to Heroku

### Heroku account setup:
- Create a heroku account
- Create new heroku app
- Install heroku tool-belt

### mLab database setup 
- Create mLab account
- Create database
- Get MongoDB URI

### Stonecutter set up
- Deploy a Stonecutter instance, as found at `https://github.com/d-cent/stonecutter`
- Login as an admin
- Navigate to Apps page
- Add an app for your Mooncake instance
- Get client ID and secret, as generated by Stonecutter 

### Local Heroku configuration:
- Clone the repository: `git clone https://github.com/d-cent/mooncake.git`
- Log in to your Heroku account: `heroku login`
- Add Heroku remote: `heroku git:remote -a [APP_NAME]`
- Set buildpacks: 

        heroku buildpacks:set heroku/nodejs
        heroku buildpacks:add heroku/clojure

- Set Config Vars on Heroku
  - BASE_URL = [app uri]
  - AUTH_URL = [Stonecutter url]
  - CLIENT_ID = [Stonecutter client id]
  - CLIENT_SECRET = [Stonecutter client secret]
  - MONGO_URI = [MongoDB URI from mLab]
  - HOST = 0.0.0.0
  - ACTIVITY_SOURCE_FILE = resources/activity-sources.yml
- Update, add and commit the resources/activity-sources.yml file

- Push to Heroku
{'fraction_non_alphanumeric': 0.09195402298850575, 'fraction_numerical': 0.004682843763303533, 'mean_word_length': 3.5019157088122603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2916011', 'n_tokens_mistral': 810, 'n_tokens_neox': 765, 'n_words': 273}