Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albertoadami/user-api-service-example
Example of REST APIs service using http4s library
https://github.com/albertoadami/user-api-service-example
cats-effect functional-programming http4s rest-api scala
Last synced: about 22 hours ago
JSON representation
Example of REST APIs service using http4s library
- Host: GitHub
- URL: https://github.com/albertoadami/user-api-service-example
- Owner: albertoadami
- License: mit
- Created: 2020-04-22T22:06:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-20T12:14:59.000Z (about 2 years ago)
- Last Synced: 2023-10-04T00:55:46.749Z (about 1 year ago)
- Topics: cats-effect, functional-programming, http4s, rest-api, scala
- Language: Scala
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# user-api
Example of REST APIs written in Scala that allow to create and manage users in a SQL datastore.## Technology stack
The project is using the following technology Stack:
* Scala
* Http4s
* Cats Effect
* Doobie
* PostgresThe Project uses a multi-mobule Sbt project, that's composed by the following modules:
* service: contains the code about the REST api itself;
* end-to-end: contains public api tests on the multiple REST APIs;
* performance: contains the load tests scenario for the REST APIs using Gatling;## How to run
To run the application you need to have the following dependencies installed on your machine:
* `Scala` and `sbt` installed;
* `Java 11` installed;
* `Docker engine installed`.To build the project to run it's needed to build the Docker image with command `sbt 'service/docker:publishLocal`.
To run the end-to-end tests you can do it with the command `sbt 'end-to-end/test'.`
Instead to run the performance test in your local machine the procedure is the following:
* `dockerComposeUp:` to run the Postgres instance and the rest api container;
* `sbt 'project performance; gatling:test':` to run the performance test using Gatling on the local machine.