Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 2.54 KB

dev_setup.md

File metadata and controls

92 lines (66 loc) · 2.54 KB

This is a draft, feel free to send a PR fixing issues/typos!

Goals

  • List all configs you need to set to have a minimum development Kin install
  • List the gulp tasks used for a complete dev flow (building, testing ... )

Requirements

Kin Server

  1. Fork KinToday/kin-api-server and fetch your fork locally.

  2. Follow the instructions in config.js and secrets.js, to configure the API server for your particular setup.

  3. Install Kin's dependencies via npm

    $ npm install
    
  4. Build the server code (creates links in servers/ pointing at sources in src/, creates the PM2 process file)

    $ npm run build:dev
    
  5. Launch the application through PM2:

    $ npm run start
    
  6. To gracefully reload the app when making file changes, you can run:

    $ npm run watch:dev
    

Kin Client

  1. Fork KinToday/kin-web-client and fetch your fork locally.

  2. Follow the instructions in config.js, to configure the client for your particular setup

  3. Install Kin's dependencies via npm

    $ npm install
    
  4. Launch Webpack's dev server via:

    $ npm run watch:dev
    

Misc.

Tests

this is available both for the client and the server

Run tests one time:

$ npm test

Auto-run tests when any test file or application file has been updated:

$ npm test-watch

Docker Redis

$ docker pull redis
$ docker run -d -p 6390:6379 redis

Local cert

as a way to simplify Kin's codebase and reduce dev/prod mismatches in configuration, we require SSL everywhere

Linux / Mac OS X

This uses dev.kin.today as a domain name.

$ mkdir -p certs
$ openssl genrsa -out ./certs/localhost-key.pem 2048
$ openssl req -new -x509 -sha256 -days 365 -key ./certs/localhost-key.pem -out ./certs/localhost-cert.pem -nodes -subj '/CN=dev.kin.today'
$ echo "0.0.0.0 dev.kin.today" | sudo tee -a /etc/hosts

Windows

TODO