This repository contains the code for http://brained.io.
-
Install node/npm from http://nodejs.org/.
-
Install mongodb from http://mongodb.org/. Start it locally.
-
Install bower:
sudo npm install -g bower
(Skip "sudo" if using Windows.)
-
Clone this repository:
git clone git@github.com:Verold/brained.io.git cd brained.io
-
Run
bower install
. -
Run
npm install
.
The server can be run with node server/app.js
, but requires a number of
environment variables to be set. They can either be set using an export
command or by prefixing node invocation using the following format:
VARIABLE1=value1 VARIABLE2=value2 node server/app.js
The following variables must be set in all environments:
- NODE_ENV: The environment, either "local" or "production".
- AWS_S3_BUCKET: The name of the AWS S3 bucket to use for uploads.
- AWS_ACCESS_KEY: AWS access key.
- AWS_SECRET_KEY: AWS secret key.
- FACEBOOK_CLIENT_SECRET: Client secret for Facebook authentication.†
- GOOGLE_CLIENT_SECRET: Client secret for Google authentication.†
† You can disable Facebook or Google authentication in config/local.json.
Additionally, the following environment variables need to be set in the production environment:
- PORT: Port number, e.g., '3000'.
- DATABASE_PASSWORD: The password for the database.
- TWITTER_CLIENT_SECRET: Client secret for Twitter authentication.
- COOKIE_SECRET: the secret for generating cookies.
The following environment variables are optional:
- LOG_LEVEL: One of: 'error', 'info', 'verbose', 'debug'.
Deploying to Heroku is a matter of pushing to your Heroku remote. Make sure to set all the necessary environment variables using Heroku's admin interface.
Brained.io is implemented as a Koast app. See https://github.com/rangle/koast for more information on how to configure and run Koast.
- Varun Vachhar (winkerVsBecks), rangle.io
- Simon Ramsey, rangle.io
- Sumit Arora (sumitarora), rangle.io
- Yuri Takhteyev (yuri), rangle.io