Dev mode and production
It's the same binary and the same app folder. While you develop, Sluurp watches your files and helps you change them; in production it serves them as fast as it can and watches nothing.
Choosing
sluurp serve --public app # developing: hot reload on
sluurp serve --public app --no-hot-reload # productionHot reload is what makes it dev mode: with it on, the server watches your app and the pages listen for changes. Deploying always uses --no-hot-reload, as does the Docker image.
While you develop
- Hot reload: a saved component is swapped in place, keeping what’s on screen. A page drawn on the server is drawn again in place, and CSS swaps without a reload. See Hot reload.
- Errors where you are: a mistake in a file shows over the page, at its line, and goes away when you fix it.
- Source as written: modules come with their source maps, so the browser’s tools show your
.tsx, not what it compiled to. - The UI kit’s tools: the Source tab and the agent can write your components, and the kit warns you about components that leave things running.
- Tests with Auto-run: saving a test runs it again in the admin’s Tests screen.
- Signing in by itself, if you ask for it:
--admin-auto-loginsigns the admin in as the first superuser, from your own machine only. It’s for development, and it prints a warning when it starts. Never use it on a server others can reach.
None of this reaches production: without hot reload there are no markers in your pages, nothing is watched, and the tools that write files refuse.
In production
- Nothing is watched, and no reload script is sent.
- Libraries are bundled when the server starts, and your modules are served at addresses named after their content, so browsers keep them for good and fetch only what changed.
- Pages load only what they show: a component drawn only sometimes is fetched the first time it’s drawn. See Packages, bundles, budgets.
- The release binary is minified: modules are sent without comments or spaces.
- The licence: commercial use needs
SLUURP_LICENSEset, or a key added in the admin under Settings, License. Everything works the same with or without one. See Business licence.
Tests, either way
sluurp test starts your app on a fresh database, runs its tests in a headless browser, and stops. Run it on your machine or in CI. See Testing.