Skip to content

From source

This guide runs HappyView directly with cargo run, from a clone of its alpha branch. If you’d rather run the whole stack in containers, see Run the development stack. To deploy from prebuilt images, see Docker.

  • rustup. The repository’s rust-toolchain.toml pins the Rust version, and rustup installs it on the first build.
  • Node.js and npm, to build the dashboard.
  • (Optional) PostgreSQL if you prefer Postgres over the default SQLite. The repository’s Compose files and tests use version 17.
git
git clone --branch alpha https://github.com/gamesgamesgamesgamesgames/happyviewcd happyviewcp .env.example .env

The default branch holds v2, so name alpha. Edit .env to point at your running services:

Terminal
# SQLite (the default): no setup needed, the file is created automaticallyDATABASE_URL=sqlite://data/happyview.db?mode=rwcPUBLIC_URL=http://127.0.0.1:3000# Generate with: openssl rand -base64 48SESSION_SECRET=

Or if you prefer Postgres:

Terminal
DATABASE_URL=postgres://happyview:happyview@localhost/happyview

See Configuring an instance for what to set first, the Configuration reference for every variable, and the database setup guide for details on both backends.

If using SQLite, skip this step: HappyView creates the database file automatically.

If using Postgres:

createdb
createdb happyview

Or if using a Postgres user with a password:

psql
psql -c "CREATE DATABASE happyview;" -U postgres

HappyView runs migrations automatically on startup, so no manual migration step is needed.

A plain cargo run carries no dashboard of its own and serves ./web/out, so export it once:

web
cd webnpm cinpm run buildcd ..

Skip this if you need only the API. Run it again after pulling changes to web/.

cargo
cargo run

HappyView starts on port 3000 (configurable via the PORT environment variable). curl http://127.0.0.1:3000/health answers ok once it’s listening.

Your HappyView instance is running. Install an interpreter before saving any script: a self-hosted instance ships with none (Languages). Then deploy a project to it.