longa

command module
v0.0.0-...-34ee4e0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

README

Longa

("long" in Esperanto)

Simple, small single-user URL shortener app built with Go + an admin interface in React.

Screenshot of admin dashboard

Configuration

App will read from config.toml, config.json or config.yaml. Check out config.example.toml for default values. Env variables take priority if present.

Config file option Env var Description
database_uri L_DATABASE_URI Database URI (SQLite only)
listen_addr L_LISTEN_ADDR Port the web server will listen on
home_redirect L_HOME_REDIRECT Where the / route redirects to
username L_USERNAME Username for API and dashboard auth
password L_PASSWORD Password for API and dashboard auth

Accessing dashboard

The dashboard is accessible at <app endpoint>/_/.

Building from source

Requires: Go 1.17, GCC (for sqlite), NodeJS, Yarn

# In the root directory of the project
cd frontend
yarn
yarn build
cd ..
go build

This should output an executable named longa.exe on Windows or longa everywhere else.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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