Skip to main content

What is the loader?

The loader is the runtime behind nf start and nf dev. You don’t install or run it yourself: the CLI includes it and starts one loader per app of your project. A game without a server has only the client loader and the loading page.

Ports

The server loader opens no port of its own: your server code opens the ones it needs.

Environment variables

Each loader passes the NANOFORGE_* variables that nf start gives it to your game, with the prefix removed: NANOFORGE_CLIENT_SERVER_ADDRESS in .env reaches the client game as SERVER_ADDRESS. The client’s variables are sent to the browser, so anyone can read them. The rules are on the environment variables page.

Troubleshooting