Used with landscape-frontend
-- configure and build
cabal configure && cabal build
-- run API. defaults to port :8081
cabal exec landscape-cli run
run
Run API server. Optional port number
run [-p|--port]
createuser
Create a user. If the -a --admin flag is present a API key is created and can be used for API POST / DELETE methods.
createuser (-u|--username ARG) (-p|--password ARG)
[-e|--email ARG] [-a|--admin]
nix-build release.nix
Nix binaries are stored on Cachix. To use the cache configure your nix.conf by running
cachix use naglalakk
The static path is static/uploads. This folder is omitted from the repository since we don't want to store arbitrary static files within the repo. When first running this project you must create this folder if you want the upload to work properly. At the root of this project simply do
mkdir static/uploads
Additionally you need to create a folder for the log files, used in production
mkdir logs
Environment variables can be stored at the root of this project in a .env file. The current env variables used by this service are the following
ENV
Current environment. The options are
- Development
- Production
Switching these environments mostly changes how logging is managed
PORTNR
The port number for the service to run on.
PGHOST
Postgres host (e.g. localhost)
PGPORT
Postgres port
PGUSER
Postgres username
PGPASS
Postgres password
PGDATABASE
Postgres database