Skip to content

Progeser/progeser-api

Repository files navigation

Uniser API

Build Status Dependabot Maintainability Coverage License Made With Love <3

Presentation

ProGeSer API is part of the ProGeSer project, an application to manage greenhouses. You can find the front part here.

Run the application

You can run the application in 2 ways.

With Ruby

Requirements

  • Ruby v 3.3.5
  • Bundler v. >= 2.5.18
  • Postgresql v. 15.0.0

How to run

Installation

At the root of the project, run the following:

gem install bundler

bundle install

Run

To launch the application run the following:

bundle exec rails s

Then, to populate database and some fake datas, run the following:

bundle exec rake db:create db:migrate db:seed

You can call the API on port 3000 by default.

To see the endpoints documentation, you can go to:

http://localhost:3000/apidoc

Run tests

To run smoke tests, run the following:

bundle exec rails test

To run integration tests, run the following:

bundle exec rails spec

With Docker

Requirements

  • Docker v. >=24.0.7
  • Docker Compose v. >= 2.23.0

How to run

At the root of the project, run the following:

docker-compose up -d

To populate database and some fake data, run the following:

docker-compose run web bundle exec rake db:create

docker-compose run web bundle exec rake db:migrate

docker-compose run web bundle exec rake db:seed

You can call the API on:

http://localhost:3000

To see the endpoints documentation, you can go to:

http://localhost:3000/apidoc