<commit_before># Freecoin installation

## Java

Java needs to be installed on the machine like
`apt-get install openjdk-7-jdk`

## MongoDB

- [Install MongoDB](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/)
- Start mongoDB as a daemon like `mongod --fork --logpath mongodb.log`

## Freecoin

Then create a freecoin dir and copy there the jar and the .lein-env of the uberjar build. Instead of the .lein-env file environmental variables or Java system properties can be used.

We can then start the freecoin app by running `java -cp target/uberjar/freecoin-0.2.0-standalone.jar freecoin.main`.

Freecoin is running on port 8000

Then copy to the same directory the ws sources.

The freecoin-admin tool is running on port 8990

## Authentication

An edn file should be added containing the email configuration

{:freecoin-email-server <PLACEHOLDER>
 :freecoin-email-user <PLACEHOLDER>
 :freecoin-email-pass <PLACEHOLDER>
 :freecoin-email-address <PLACEHOLDER>}

The default file is email-config.edn project root but can be set with the env variable EMAIL_CONFIG

## Troubleshooting

- No X11 DISPLAY variable was set
-- start with ring server-headless

## TODO

- Better configuration management (instead of lein-env files)<commit_msg>Config keys gotta be renamed for a more generic approach<commit_after># Freecoin installation

## Java

Java needs to be installed on the machine like
`apt-get install openjdk-7-jdk`

## MongoDB

- [Install MongoDB](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/)
- Start mongoDB as a daemon like `mongod --fork --logpath mongodb.log`

## Freecoin

Then create a freecoin dir and copy there the jar and the .lein-env of the uberjar build. Instead of the .lein-env file environmental variables or Java system properties can be used.

We can then start the freecoin app by running `java -cp target/uberjar/freecoin-0.2.0-standalone.jar freecoin.main`.

Freecoin is running on port 8000

Then copy to the same directory the ws sources.

The freecoin-admin tool is running on port 8990

## Authentication

An edn file should be added containing the email configuration

{:email-server <PLACEHOLDER>
 :email-user <PLACEHOLDER>
 :email-pass <PLACEHOLDER>
 :email-address <PLACEHOLDER>}

The default file is email-config.edn project root but can be set with the env variable EMAIL_CONFIG

## Troubleshooting

- No X11 DISPLAY variable was set
-- start with ring server-headless

## TODO

- Better configuration management (instead of lein-env files)
{'fraction_non_alphanumeric': 0.07622072250893211, 'fraction_numerical': 0.0111155220325526, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4774348', 'n_tokens_mistral': 800, 'n_tokens_neox': 756, 'n_words': 311}