https://github.com/davicedraz/elixpay-api
First try at Elixir: payment API example
https://github.com/davicedraz/elixpay-api
ecto elixir phoenix postgres
Last synced: about 1 month ago
JSON representation
First try at Elixir: payment API example
- Host: GitHub
- URL: https://github.com/davicedraz/elixpay-api
- Owner: davicedraz
- Created: 2021-02-23T23:19:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-28T23:53:43.000Z (over 5 years ago)
- Last Synced: 2025-03-01T17:02:04.927Z (over 1 year ago)
- Topics: ecto, elixir, phoenix, postgres
- Language: Elixir
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Elixpay
Playing around with Elixir. Based on [Rafael Camarda](https://github.com/RafaelCamarda) training.
## Run
You gonna need a postgres database:
```
$ docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
```
Start your Phoenix server:
* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.setup`
* Start Phoenix endpoint with `mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser:
* POST - /api/users
```JSON
{
"name": "Davi Cedraz",
"email": "davioler@gmail.com",
"username": "davicedraz",
"age": 24,
"password": "123456"
}
```
* POST - /api/accounts/transaction
* Basic Auth: (admin:passwd)
```JSON
{
"from": "a6516cc6-904a-4f7c-bd0b-c06e1498a5d0",
"to": "4f3361fd-f152-47fb-9345-c1a7432ee50b",
"value": "50.00"
}
```
____
## Test
Execute:
```
mix test --cover
```
or
```
$ mix coveralls.html
```
## About
* Official website: https://www.phoenixframework.org/
* Guides: https://hexdocs.pm/phoenix/overview.html
* Docs: https://hexdocs.pm/phoenix
* Forum: https://elixirforum.com/c/p
* Source: https://github.com/phoenixframework/phoenix