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
- Git, Node.js, Redis
- SSL cert for a domain resolving to your local host.
- (some) understanding of Kin's stack
-
Fork KinToday/kin-api-server and fetch your fork locally.
-
Follow the instructions in
config.js
andsecrets.js
, to configure the API server for your particular setup. -
Install Kin's dependencies via
npm
$ npm install
-
Build the server code (creates links in
servers/
pointing at sources insrc/
, creates thePM2
process file)$ npm run build:dev
-
Launch the application through
PM2
:$ npm run start
-
To gracefully reload the app when making file changes, you can run:
$ npm run watch:dev
-
Fork KinToday/kin-web-client and fetch your fork locally.
-
Follow the instructions in
config.js
, to configure the client for your particular setup -
Install Kin's dependencies via
npm
$ npm install
-
Launch Webpack's dev server via:
$ npm run watch:dev
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 pull redis
$ docker run -d -p 6390:6379 redis
as a way to simplify Kin's codebase and reduce dev/prod mismatches in configuration, we require SSL everywhere
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
TODO