Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 893 Bytes

File metadata and controls

50 lines (44 loc) · 893 Bytes

Kinode Labs Website

Setup

First-time setup

npm i -g yarn 
yarn 
yarn global add serve 

Create DBs

node createTestDb.cjs
node createDb.cjs

Create .env file

echo "SECRET_KEY=\"$(openssl rand -base64 32)\"" > .env

Set up Caddy

cp Caddyfile /etc/caddy/Caddyfile

Develop

# 1. Start the server
    node server.cjs
# 2. Start the frontend
    # in a new session
    yarn start

Deploy

# 0. Test the server
    npx jest
# 1. Do it again. Just to be sure.
    npx jest
# 2. IF tests pass, deploy server 
    yarn build
    NODE_ENV=production node server.cjs # the server (podcast and blog auth)
# 3. Deploy frontend
    # in a new session
    serve -s ./build
    # for future updates and deployments, build it in a different session and then swap the server
    # (this is to avoid downtime)