mervmap

command module
v0.0.0-...-487bb46 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

README

MervMap

This is a small website for inhabitants of the Town of Merveilles to share their locations with each other, to help with organizing events and such. It's built with Go, and uses a very simple database (read: a csv file) to store locations.

It represents locations graphically using html elements stylized as circles on the map, each circle shows info if it is hovered over, without relying on javascript!

Dependencies & Libraries

  • Go 1.22
  • securecookie v1.1.1
  • sessions v1.2.1
  • go-mastodon v0.0.6

Running

  1. go build .
  2. run ./mervmap

Configuration

The following environment variables are used on startup, with defaults set to allow for running in "production".

Variable Default Description
MERVMAP_DEBUG "false" When set to true, the program runs in debug mode. This skips authorization, and sets usernames to "debug".
MERVMAP_COOKIE "mastomap-session" The name of the cookie to save people's session data in.
MERVMAP_OAUTH_URI "https://merveilles.town/oauth/authorize" The uri to access to obtain authorization from.
MERVMAP_OAUTH_REDIRECT_URI "https://map.merveilles.town/oauth" The uri to redirect back to once authorization has been given.
MERVMAP_STATIC_PATH "./static/" Path for static assets
MERVMAP_USE_EMBED "false" When set to true, the server will statically embed its templates into the binary. This is experimental, and may or may not work as intended.
MERVMAP_DB_PATH "db.csv" Path to the location database.

Inspiration

  • cblgh's project cerca, which is a wonderful example of small, community-focused tooling.
  • j3s's vore for the wonderfully tidy backend design, whose influences you can probably see in the codebase!
  • nmkj's audon, which started the idea of a local-only tool with authorization provided by our existing oauth infrastructure.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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