Requires yarn for package management.
To start:
- Create
config/development.json
with necessary configuration. $ yarn install
$ npm run dev
This will start an HTTP server on http://localhost:3000
.
nerv-server uses PostgreSQL as a database.
brew install postgresql
brew services start postgresql
(to start pgsql on boot, optional)$ createuser nerv
$ createdb nerv
$ echo "grant all privileges on database nerv to nerv" | psql --db nerv
You'll also need Redis, which is used for pub/sub in the websocket system. Just brew install redis
.
The following environment variables are required. You can safely copy and paste this into
development.json
to get started.
{
"ALLOWED_ORIGINS": "http://localhost:8081",
"AUTH_SECRET": "that's a spicy meatball", // or whatever you want :)
"DB_HOST": "localhost",
"DB_PORT": 5432,
"DB_USER": "nerv",
"DB_PASSWORD": "nerv",
"DB_DATABASE": "nerv",
"DB_TLS": false,
"REDIS_HOST": "localhost",
"REDIS_PORT": 6379
}