This section covers how to get the Stoke List API running locally. The workflow is optimized for contributors.
https://github.com/simonwex/javascript-style-guide
Make sure you have nodejs
, npm
, and git
installed.
gulp
is required to run the test suite and package client-side libraries with browserify. To install gulp on unix and OS X, run sudo npm install gulp -g
.
Install Node packages:
npm install
Configure your env:
cp sample.env .env
A short explanation of a complete .env
file:
DATABASE_URL: The url, including credentials to access the db. This can be either mysql, postges or sqlite3
PORT: The port the server will run on
COOKIE_SECRET: The secret used to encrypt the cookie. You should change this to a string of your choosing
POSTMARK_KEY: Your Postmark API key
REDIS_PORT: Redis Server Port
REDIS_HOST: Redis Server Hostname
REDIS_DB: Redis DB
REDIS_PASS: Redis password
The sample.env includes details for sqlite3. If you have no opinion, stick with it for development.
Create your database by running:
./bin/migrate up
Process management is delegated to Foreman. Go there, install it.
To actually run the service, run foreman start
in the project directory.