Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cardoso010/api_banking
Stone "Api Banking" Interview Challenge
https://github.com/cardoso010/api_banking
api docker ecto elixir phoenix tdd
Last synced: about 1 month ago
JSON representation
Stone "Api Banking" Interview Challenge
- Host: GitHub
- URL: https://github.com/cardoso010/api_banking
- Owner: cardoso010
- Created: 2021-01-19T15:44:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-26T14:59:27.000Z (almost 4 years ago)
- Last Synced: 2023-03-06T02:38:08.129Z (almost 2 years ago)
- Topics: api, docker, ecto, elixir, phoenix, tdd
- Language: Elixir
- Homepage:
- Size: 114 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ApiBanking
[![Build Status](https://github.com/cardoso010/api_banking/workflows/TEST/badge.svg?branch=main)](https://github.com/cardoso010/api_banking/actions)
[![Build Status](https://github.com/cardoso010/api_banking/workflows/DEPLOY/badge.svg?branch=main)](https://github.com/cardoso010/api_banking/actions)## Requirements
Resources that must be installed for this project to work.
- [docker](https://docs.docker.com/install/)
- [docker-compose](https://docs.docker.com/compose/install/)## Setup
Clone this repository:
```shell
git clone https://github.com/cardoso010/api_banking.git
``````shell
cd api_banking
```This project uses docker-compose.
First of all you need to build the container
```shell
docker-compose build
```Now is necessary that you run setup to get dependencies, create database, create migrations and run seed.
```shell
docker-compose run web mix setup
```Then you up your container
```shell
docker-compose up
```Now you can visit [`localhost:4000/api/v1`](http://localhost:4000/api/v1) from your browser
Exec tests
```shell
docker-compose run -e "MIX_ENV=test" web mix test
```Exec coveralls
```shell
docker-compose run -e "MIX_ENV=test" web mix coveralls
```Generate Swagger Docs
```shell
docker-compose run web mix phx.swagger.generate
```You can visit Swagger [`localhost:4000/api/swagger/index.html`](http://http://localhost:4000/api/swagger/index.html) from your browser.
## Deployment
Project is running at Heroku Platform, so you can access [`https://apibanking.herokuapp.com/api/v1`](https://apibanking.herokuapp.com/api/v1).
Or you can access swagger directly [`https://apibanking.herokuapp.com/api/swagger/index.html`](https://apibanking.herokuapp.com/api/swagger/index.html) from your browser