From 9ea8fa81674915d1e554c162a232608f0dc33089 Mon Sep 17 00:00:00 2001 From: Franek Date: Mon, 29 Apr 2024 16:58:16 +0000 Subject: [PATCH] add: README --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e709a12 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# zine API +API server for all **zine** services. +## Installation + +1. [Install Rust](https://www.rust-lang.org/tools/install) +2. Clone this repository +3. Create `.env` file and edit your environment variables +4. Fetch required dependencies +```sh +cargo fetch +``` +5. Run application +```sh +cargo run +``` +## Environment variables + +To run this project, you will need to add the following environment variables to your .env file + +- General +| Variable name | Description | Default | Required | +| -- | -- | -- | -- | +| `HOST` | API host | 127.0.0.1 | false +| `PORT` | Port to listen to | 8080 | false +| `LOG_LEVEL` | Logging level (e.g. `INFO`, `WARN`, `ERROR`) | `INFO` | false + +- Database + | Variable name | Description | Default | Required | + | -- | -- | -- | -- | + | `DATABASE_URI` | PostgreSQL database URI | | true + + alternative solution: + | Variable name | Description | Default | Required | + | -- | -- | -- | -- | + | `DATABASE_HOST` | PostgreSQL database host | 127.0.0.1 | false + | `DATABASE_PORT` | PostgreSQL database port | 5432 | false + | `DATABASE_USER` | PostgreSQL database user | postgres | false + | `DATABASE_PASSWORD` | PostgreSQL database password | "" | false + + > **Note** + > + > If provided, `DATABASE_URI` will **always** take precedence over `DATABASE_{HOST, PORT, USER, PASSWORD}`. +## Documentation + +If you want to get some informations about our API, just see our [wiki](https://git.sador.me/zine/api/wiki)! +## Feedback + +If you have any feedback, issue with our app, or anything related to our app, please reach out to us at **zine@sador.me**. +## License + +[MIT](https://choosealicense.com/licenses/mit/) +## Authors & contributors + +- [@sadorowo](https://git.sador.me/sadorowo) +