notskamr / flux

Home Page:https://flux.vsahni.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flux

A simple, data streaming service that takes advantage of Server-Sent Events (SSE).

Deploy on Railway

Docs

Website

Self-Hosting

  1. To self-host, clone the repository:
git clone
  1. Create a Turso database (or use a local SQLite database)

  2. Create a .env file in the root directory and add the following:

    TURSO_URL={libsql://your-turso-url.turso.io} # or a local file - file:data.db
    TURSO_AUTH_TOKEN={YOUR_AUTH_TOKEN} # not needed for local SQLite
    WAL_MODE={OPTIONAL_WAL_MODE} # set to 'true' to run local SQLite in WAL mode
    API_KEY={OPTIONAL_API_KEY}
  3. Download Bun

  4. Push schema to Turso/SQLite database:

     bunx drizzle-kit push:sqlite

Hosting

Host on Vercel, Railway, a VPS with Docker, or any other hosting service that supports Bun. Make sure to add the environment variables to the hosting service.

Development

To install dependencies:

bun install

To run:

bun run dev

Open:

http://localhost:3000

About

https://flux.vsahni.me


Languages

Language:TypeScript 69.9%Language:HTML 30.1%