Skip to content

How to host flok web

Damián Silvani edited this page Aug 26, 2021 · 1 revision

(work in progress)

  • Install Yarn (globally)
npm i -g yarn
  • Clone repository, install flok-web dependencies and build:
cd packages/web
yarn
yarn build
  • Copy SSL certificate files to packages/web/cert/

  • Finally, run the server:

SECURE=1 PORT=3001 NODE_ENV="production" yarn start

Change PORT to the correct port.

If you use a process manager like pm2, here's an example (ecosystem.config.js):

module.exports = {
  apps: [
    {
      name: "flok",
      script: "index.js",
      watch: true,
      env: {
        PORT: 3001,
        SECURE: 1,
        NODE_ENV: "production"
      }
    }
  ]
}
Clone this wiki locally