Enafore requires Node.js and pnpm.
To build Enafore for production, first install dependencies:
pnpm install --frozen-lockfile
Then build:
pnpm build
Then run:
PORT=4002 node server.js
To build Enafore as a frontend for one instance, set the SINGLE_INSTANCE environment variable.
SINGLE_INSTANCE=your.domain.tld pnpm build
Enafore is a static site. When you run pnpm build
, static files will be
written to __sapper__/export
.
To install with dev dependencies, run:
pnpm install
To run a dev server with hot reloading:
pnpm dev
Now it's running at localhost:4002
.
Linux users: for file changes to work,
you'll probably want to run export CHOKIDAR_USEPOLLING=1
because of this issue.
Enafore uses JavaScript Standard Style.
Lint:
pnpm lint
Automatically fix most linting issues:
pnpm lint-fix
lol, lmao
To disable minification in a production build (for debugging purposes), you can run:
DEBUG=1 pnpm build
The Webpack Bundle Analyzer report.html
and stats.json
are available publicly via e.g.:
This is also available locally after pnpm build
at .sapper/client/report.html
.
See Architecture.md.