Skip to main content
fluid sites dev runs your Site on your machine with a database of its own. fluid.db works before you publish, and nothing you write locally reaches the live Site. Run it in the Site’s folder:
It starts the folder’s dev script, or serves the build in dist when package.json has none, at http://127.0.0.1:9500. Hot reload keeps working. It needs no login.

What’s local and what isn’t

  • Local rows stay local. The local database is separate from the live Site’s. Publishing never sends local rows, and no command uploads them. The command adds .fluid/ to .gitignore, so the file isn’t committed or saved to the Site’s source either.
  • You’re the Site’s owner by default. Local rows are written by local-owner, not by your real user, and carry created_by local-owner. A guest is allowed only what a public rule allows.
Test sign-in, the Member API and the cart on the published Site, or in Mist (below).

Options

--reset-db deletes .fluid/dev.sqlite and its state, every local row with them, and creates the tables again from db/schema.json.

Schema changes

db/schema.json is applied when the command starts and each time you save it. A change that drops or changes data waits for you to confirm it at the terminal. To confirm without a terminal, pass --confirm <id> for each migration. See Develop locally on the database page and Change the schema.

In Mist

In Mist, Run starts fluid sites dev for you, and the Local preview shows it. Mist’s previews run as the member you’re signed in to Mist as, so fluid.auth.me() and the Member API answer for you there, while fluid.db still uses the local database. The cart still needs the storefront page, so check it on the published Site. You can ask Mist in chat what’s in the local database: it reads .fluid/dev.sqlite and never writes to it.