Node.js & Postgres

Lunch poll

Vote for lunch and see the daily totals. Managed Postgres keeps the votes across restarts.

mossy-starling.tori.cloud

Deploy your own copy

You’ll need Git and Node.js 20 or newer. Clone the public repository and run these commands from a terminal.

git clone https://github.com/tori-host/examples
cd examples/mossy-starling
npx tori.host

On the first deploy, the CLI opens a browser to sign in or create an account, then gives you a new tori.cloud URL. The tori.json file it writes lets you deploy to the same app again.

Attach Postgres and migrate

After the first deploy, create the database.

npx tori.host db create

Repeat npx tori.host db status until it reports ready. Then repeat npx tori.host env list until DATABASE_URL appears. Deploy again to apply the migrations.

npx tori.host deploy --release "node migrate.mjs"