# 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)