hostr/README.md

57 lines
1.8 KiB
Markdown
Raw Normal View History

2016-05-24 19:37:12 +01:00
# Hostr
2015-08-23 23:50:37 +00:00
2015-08-23 19:12:59 +01:00
## About
Hostr is a project I started almost ten years ago when I set out to learn web development. Since then it's seen over 100,000 signups and served up over 2 billion file downloads.
2015-08-23 19:20:30 +01:00
It has been through many iterations, but in its current incarnation Hostr uses [Koa](http://koajs.com/) for the backend, [Angular](https://angular.io/) and [JSPM](http://jspm.io) for the frontend, and [Babel](https://babeljs.io/) for both.
2015-08-23 19:12:59 +01:00
2015-07-09 23:01:43 +01:00
## 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-30 18:35:05 +02:00
See [`.env.example`](.env.example). Copy it to `.env`, modify and `source .env` for development. [autoenv](https://github.com/kennethreitz/autoenv) is pretty nice for doing this automatically when you `cd` into your work directory.
2015-07-09 23:01:43 +01:00
### Deploying to Heroku
2015-08-30 18:35:05 +02:00
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` on Heroku.
2015-07-09 23:01:43 +01:00
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
2015-08-30 18:35:05 +02:00
Alternatively
```
$ npm run watch
```
Will watch your JS and CSS for changes, rebuild them, and reload the server.
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.