temochka / lantern

A lightweight web backend for personal productivity apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lantern

Lantern is alpha software. It contains bugs and shortcomings that will almost certainly make you mad. Don’t try to use it unless you’re a good stoic and have a lot of free time.

Lantern is a lightweight backend for writing personal productivity apps. It handles authentication, serves static files, stores your data (in SQLite), and re-runs active SQL queries when the data changes. It exposes a WebSocket-based API that is designed for reactive UIs.

Installation

Static binaries for macOS, Linux (i386/amd64) are available from the releases tab on GitHub.

Usage

Create and enter a directory for your first project:

mkdir my-lantern-app
cd !$

Create your index file:

echo "<html><head><title>My Lantern App</title></head><body>Lantern lit</body></html>" > index.html

Start Lantern in the current directory:

$ LANTERN_PASSWORD=password lantern .
...lantern lit on port 4666, serving files from .

API usage

TODO

Bring your own schema

You can use Lantern with your existing SQLite-compatible schema. Create a new empty project, then create a .lantern directory:

mkdir .lantern

Now copy your SQL schema file to this new directory:

cp ~/my-old-backend/schema.sql .lantern/schema.sql

Start Lantern in the project root and it will load and normalize your schema.

About

A lightweight web backend for personal productivity apps

License:Apache License 2.0


Languages

Language:Rust 84.6%Language:Elm 12.4%Language:Shell 2.3%Language:Dockerfile 0.7%