<commit_before># Example Marvel Haskell

A Haskell port of the JavaScript [Example Marvel App](https://github.com/nicolashery/example-marvel-app).

## Quick start

Make sure you have [Stack](www.haskellstack.org) installed. Clone this repository then download the appropriate GHC with:

```bash
$ stack setup
```

Create an `.env` file containing necessary configuration variables:

```
export PORT=3000
export MARVEL_PUBLIC_KEY=your_public_key
export MARVEL_PRIVATE_KEY=your_private_key
```

Build the app with:

```bash
$ stack build
```

Run the app with:

```bash
$ stack exec app
```

For development, launch the REPL:

```bash
$ stack ghci
```

Inside the REPL, run the server with:

```
> :l Main.hs
> main
```

After making changes, quit the server with `Ctrl+C` and reload the code:

```
> :r
> main<commit_msg>Add env instructions in README<commit_after># Example Marvel Haskell

A Haskell port of the JavaScript [Example Marvel App](https://github.com/nicolashery/example-marvel-app).

## Quick start

Make sure you have [Stack](www.haskellstack.org) installed. Clone this repository then download the appropriate GHC with:

```bash
$ stack setup
```

Create an `.env` file containing necessary configuration variables:

```
export PORT=3000
export MARVEL_PUBLIC_KEY=your_public_key
export MARVEL_PRIVATE_KEY=your_private_key
```

Build the app with:

```bash
$ stack build
```

Run the app with:

```bash
$ source .env
$ stack exec app
```

For development, launch the REPL:

```bash
$ source .env
$ stack ghci
```

Inside the REPL, run the server with:

```
> :l Main.hs
> main
```

After making changes, quit the server with `Ctrl+C` and reload the code:

```
> :r
> main
{'fraction_non_alphanumeric': 0.11513353115727003, 'fraction_numerical': 0.004747774480712166, 'mean_word_length': 4.7542662116040955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4451023', 'n_tokens_mistral': 588, 'n_tokens_neox': 531, 'n_words': 195}