<commit_before>![The Low-Profile Dog Hoodie Mascot](https://avatars1.githubusercontent.com/u/1888826?v=3&s=200)

# Welcome to `hoodie-server!` 🎉

[![Build Status](https://travis-ci.org/hoodiehq/hoodie-server.svg?branch=next)](https://travis-ci.org/hoodiehq/hoodie-server)
[![Coverage Status](https://coveralls.io/repos/hoodiehq/hoodie-server/badge.svg?branch=next&service=github)](https://coveralls.io/github/hoodiehq/hoodie-server?branch=next)
[![Dependency Status](https://david-dm.org/hoodiehq/hoodie-server/next.svg)](https://david-dm.org/hoodiehq/hoodie-server/next)
[![devDependency Status](https://david-dm.org/hoodiehq/hoodie-server/next/dev-status.svg)](https://david-dm.org/hoodiehq/hoodie-server/next#info=dependencies)


`hoodie-server` is the core server component of Hoodie. Together with `hoodie-client`, it forms the two parts that make up the Hoodie system.

`hoodie-server` is responsible for a number of things on the server:

- check the environment to make sure Hoodie can run properly
- start an instance of CouchDB, Hoodie’s database
- start a webserver each for the Hoodie app itself and the Hoodie Admin Dashboard
- start all Hoodie plugins that might be installed

`hoodie-server` isn’t meant to be used by itself and it is used by the `hoodie` module, which also inlcude `hoodie-client` to form Hoodie.

You can use `hoodie-server` on its own, if you want to work on it, help fix bugs or test new versions. And when you are writing your own plugin, you can use `hoodie-server` for debugging.

## Usage

As noted before, this isn’t meant to be run standalone, but if you are helping out with development, or build your own plugins, or just want to spelunk around, here’s how it works:

```
git clone <EMAIL>:hoodiehq/server.git
cd server
npm install
```

When that’s done, you can run `./bin/start` to start `hoodie-server`. Usually, `hoodie-server` is run within the context of an existing frontend application, but when you run it alone, it will use its `www/` directory to serve the web app. For now, this is just a simple `index.html` file that says `hi`.

There are a few options to change the behaviour of `hoodie-server`. See a list by running `./bin/start --help`. It looks something like this:

```
Usage: npm start -- [options]

Options:
  --www           Set www root directory
  --custom-ports  Provide custom ports www,admin,couchdb
  --in-memory     Use a pure in-memory database which will be deleted upon restart<commit_msg>docs(README): fix installation instructions<commit_after>![The Low-Profile Dog Hoodie Mascot](https://avatars1.githubusercontent.com/u/1888826?v=3&s=200)

# Welcome to `hoodie-server!` 🎉

[![Build Status](https://travis-ci.org/hoodiehq/hoodie-server.svg?branch=next)](https://travis-ci.org/hoodiehq/hoodie-server)
[![Coverage Status](https://coveralls.io/repos/hoodiehq/hoodie-server/badge.svg?branch=next&service=github)](https://coveralls.io/github/hoodiehq/hoodie-server?branch=next)
[![Dependency Status](https://david-dm.org/hoodiehq/hoodie-server/next.svg)](https://david-dm.org/hoodiehq/hoodie-server/next)
[![devDependency Status](https://david-dm.org/hoodiehq/hoodie-server/next/dev-status.svg)](https://david-dm.org/hoodiehq/hoodie-server/next#info=dependencies)


`hoodie-server` is the core server component of Hoodie. Together with `hoodie-client`, it forms the two parts that make up the Hoodie system.

`hoodie-server` is responsible for a number of things on the server:

- check the environment to make sure Hoodie can run properly
- start an instance of CouchDB, Hoodie’s database
- start a webserver each for the Hoodie app itself and the Hoodie Admin Dashboard
- start all Hoodie plugins that might be installed

`hoodie-server` isn’t meant to be used by itself and it is used by the `hoodie` module, which also inlcude `hoodie-client` to form Hoodie.

You can use `hoodie-server` on its own, if you want to work on it, help fix bugs or test new versions. And when you are writing your own plugin, you can use `hoodie-server` for debugging.

## Usage

As noted before, this isn’t meant to be run standalone, but if you are helping out with development, or build your own plugins, or just want to spelunk around, here’s how it works:

```
git clone <EMAIL>:hoodiehq/hoodie-server.git
cd hoodie-server
npm install
```

When that’s done, you can run `./bin/start` to start `hoodie-server`. Usually, `hoodie-server` is run within the context of an existing frontend application, but when you run it alone, it will use its `www/` directory to serve the web app. For now, this is just a simple `index.html` file that says `hi`.

There are a few options to change the behaviour of `hoodie-server`. See a list by running `./bin/start --help`. It looks something like this:

```
Usage: npm start -- [options]

Options:
  --www           Set www root directory
  --custom-ports  Provide custom ports www,admin,couchdb
  --in-memory     Use a pure in-memory database which will be deleted upon restart
{'fraction_non_alphanumeric': 0.10952572347266881, 'fraction_numerical': 0.00482315112540193, 'mean_word_length': 4.421568627450981, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 18, 'lorem ipsum': 0, 'www.': 8, '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': '6972300', 'n_tokens_mistral': 1594, 'n_tokens_neox': 1537, 'n_words': 580}