hostr/README.md

72 lines
1.9 KiB
Markdown
Raw Normal View History

2015-07-09 23:01:43 +01:00
# Hostr [![Circle CI](https://circleci.com/gh/kudos/hostr.svg?style=svg&circle-token=1b4dec62afcb7960446edf241a5cf9238b8c20ed)](https://circleci.com/gh/kudos/hostr)
## Getting Started
### Runtimes
2015-08-23 17:52:22 +01:00
Currently tested and runs on iojs 2.5.0, probably works on earlier releases and on node. Does yet not work on iojs > 3 due to the NAN changes introduced.
2015-07-09 23:01:43 +01:00
### Dependencies
You'll need `graphicsmagick` for image thumbnailing, everything else is taken care of by an `npm install`.
2015-08-23 17:52:22 +01:00
### Enviroment Variable Configuration
2015-07-09 23:01:43 +01:00
2015-08-23 17:52:22 +01:00
`AWS_ACCESS_KEY_ID`
2015-07-09 23:01:43 +01:00
2015-08-23 17:52:22 +01:00
`AWS_SECRET_ACCESS_KEY`
2015-07-09 23:01:43 +01:00
2015-08-23 17:52:22 +01:00
`AWS_BUCKET`
2015-07-09 23:01:43 +01:00
2015-08-23 17:52:22 +01:00
`MANDRILL_KEY`
2015-07-09 23:01:43 +01:00
`EMAIL_FROM` - defaults to `nobody@example.com`
`REDIS_URL` - defaults to `redis://localhost:6379`
`MONGO_URL` - defaults to `mongodb://localhost:27017/hostr`
2015-08-23 17:52:22 +01:00
`LOCAL_PATH` - defaults to `~/.hostr/uploads`.
2015-07-09 23:01:43 +01:00
`BASE_URL` - defaults to `https://localhost:4040`
`FILE_HOST` - used by API for absolute file urls, defaults to `$BASE_URL`
`API_URL` - defaults to `/api`
`PORT` - defaults to `4040`.
`VIRUSTOTAL` - API key enables Virustotal integration.
`SENTRY_DSN` - DSN enables Sentry integration.
Additionally, Hostr uses [debug](https://github.com/visionmedia/debug) so you can use the `DEBUG` environment variable something like `DEBUG=hostr*` to get debug output.
### Deploying to Heroku
Because it uses iojs and graphicsmagick runtimes hostr needs an env variable for `BUILDPACK_URL` set to `https://github.com/ddollar/heroku-buildpack-multi.git`.
You'll also need to add Heroku Redis and a MongoDB addon.
## Usage
### Start the app
2015-08-23 17:52:22 +01:00
```
$ npm start
```
This will install and build the frontend too.
2015-07-09 23:01:43 +01:00
### Run the tests
2015-08-23 17:52:22 +01:00
```
$ npm test
```
Running the tests will also set the indexes required for Mongo.
2015-07-09 23:01:43 +01:00
## Licence
2015-08-23 17:52:22 +01:00
My primary motivation is to get to work on Hostr in public. Contributions are welcome and all Javascript is MIT licenced, however the brand is not. The brand includes the name, logo images, CSS and marketing HTML.