# ^V ⚠️ this is unfinished software a tiny link shortener (& maybe pastebin in the future) ## running it ^V needs a postgresql database. for ssl, run it behind a reverse proxy like nginx. all config is done through env vars/.env file: | var | default | description | |----------------:|:---------------------------------|:---------------------------------------------------------------------------------------------| | LISTEN_ADDR | 127.0.0.1:8080 | the listen address with port. | | DATABASE_URL | | the address to the postgres database. this is passed directly to sea_orm::Database::connect | | BASE_DOMAIN | | ^V assumes https if this is set, and will use secure cookies for that domain | | V_ID_CHARSET | abcdefghijkmnpqrstuwxyz123467890 | the charset for generated ids that show up in links (manual overrides don't care about this) | | V_ID_GEN_LENGTH | 6 | length of the generated ids (again, manually set ids don't care.) | | V_DEV_TEST_DATA | | whether or not to generate a `dev` user with some test data; probably only useful for devs | (this list may be incomplete. the full list can be found at the start of the main() function in src/main.rs) ## dev info if you want to tinker with ^V, here's some pointers - it uses sea_orm for data storage abstraction. - defining new things works as follows: 1. the schema is defined through migrations (migration/), then 2. it is applied to an actual database: \ `$ sea migrate fresh` 3. entity mappings are generated from that database: \ `$ sea generate entity --with-serde both --serde-skip-deserializing-primary-key -o entity/src` - the `sea` command is provided from `$ cargo install sea-orm-cli` and needs to run with `DATABASE_URL` set (or its `-u` option)