Skip to content

bfabio/developers-italia-api

 
 

Repository files navigation

Developers Italia API

developers-italia-api logo

Go Report Card License Chat on Slack

Developers Italia API is the RESTful API of the Free and Open Source software catalog aimed at Italian Public Administrations.

Requirements

Development

The application uses Air for live-reloading in the development environment.

To start developing:

  1. Clone the repo

  2. Build and start the containers

    docker compose up

Docker Compose will bring up the app and PostgreSQL containers.

Wait until the Docker logs explicitly say the API is up and you can use its endpoints at http://localhost:3000/v1/.

The application will automatically reload when a change is made.

Configuration

You can configure the API with environment variables:

  • DATABASE_DSN: the data source used to connect to the database, fe host=db user=postgres password=postgres dbname=postgres port=5432. Supports PostgreSQL and SQLite.

  • PASETO_KEY (optional): Base64 encoded 32 bytes key used to check the PASETO authentication tokens. You can generate it with

    head -c 32 /dev/urandom | base64

    If not set, the API will run in read only mode.

  • ENVIRONMENT (optional): possible values test, development, production. Default production.

  • MAX_REQUESTS (optional): number of requests per minute after which responses will be ratelimited. Default: no limit.

Contributing

This project exists also thanks to your contributions! Here is a list of people who already contributed to this repository:

License

Copyright © 2022-present Presidenza del Consiglio dei Ministri

The source code is released under the AGPL version 3.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 98.6%
  • Smarty 1.1%
  • Dockerfile 0.3%