usehenri/henri

Add the ability to turn on/off some features

Closed this issue · 1 comments

reel commented

The main idea is to be able to turn on/off some features with .env or via package.json:

  ...
  "henri" {
    "frontend": false,
    "backend": true,
    "socketio": false,
    "rest": true
  }

Similar options in ,env file or via environment variables:

HENRI_OPTS="frontend=false;backend:true;socketio:false;rest:true"

Defaults to true if missing.

So, if you want to deploy multiple backends without nextjs overhead (?!?) or vice-versa, this can be done easily.

backend: false would disable mostly everything but Next.js

Is this necessary? Are there use cases? cookies would not be parsed and SSR partially broken without data injection...

reel commented

If you don't define something in the configuration, it will not load (next, socketio, rest, auth)