tiny-todo

command module
v0.1.0-alpha.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

tiny-todo

Latest release GitHub workflow status Code Climate maintainability Scrutinizer quality Snyk.io vulnerabilities Matrix License Open issues

A powerful task-management tapp (tiny-app), built using Go and Preact.

  • 👆 Single zero-dependency executable. Following the philosophy of tapps, tiny-todo ships as a single executable with zero dependencies!
  • 💪 Fast and lightweight. Designed with performance in mind, targeting subsecond response times.

Installation

Because tiny-todo ships as a single zero-dependency executable, installation is as simple as downloading the latest binary from our releases page for your system of choice.

Docker

We also support Docker as a source for installing and running tiny-todo!

docker run -d -p 3000:3000 ghcr.io/lukecarr/tiny-todo:latest

You can find a list of all image tags here.

CLI

serve

This starts the tiny-todo server.

You might see a warning about "Launching in in-memory mode" when running this command. Please read Data persistence for more information.

migrate

This performs the necessary SQLite migrations.

Data persistence

By default, tiny-todo launches in an "in-memory mode", where data does not persist across restarts.

You should set the SQLITE_DB environment variable to the path of an SQLite .db file (it will be automatically created if missing) so tiny-todo can store persistent data.

Warning message

To ensure that you're aware of tiny-todo's data persistence behaviour, a warning message will be logged on startup if you haven't set the SQLITE_DB environment variable:

11:44AM WRN Launching in in-memory mode as 'SQLITE_DB' environment variable wasn't set. Data will be lost on shutdown! Hint="SQLITE_DB=todo.db ./tiny-todo serve"

Environment variables

ADDR

Indicates the address that tiny-todo will listen on.

By default, this is :3000.

SQLITE_DB

The path of the SQLite database file to use for storing persistent data.

If not set, tiny-todo will launch in an "in-memory mode", and data will not persist across restarts.

LOG_LEVEL

Sets the level of logs that will be displayed when launching tiny-todo.

By default, this is info. It can be one of panic, fatal, error, warn, info, debug, or trace.

DISABLE_IN_MEMORY_WARN

Creating this environment variable (with any value) will disable the in-memory database warning message on startup.

Examples

We curate a multitude of examples for running tiny-todo in the examples directory!

Screenshot

Screenshot

Versioning

tiny-todo uses Semantic Versioning 2.0.0.

License

tiny-todo is distributed under the Apache 2.0 license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
db
env

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL