Simple project developed during the Elixir track on the Rocketseat platform.
Before you begin, make sure you have met the following requirements:
- You need the latest version of
Elixir\Erlang
on your machine.
If you need installation instructions, click here.
To install Exlivery, follow these steps:
1ยบ Clone the repository.
> git clone https://github.com/joabehenrique/rocketseat-exlivery.git
2ยบ Navigate to the project folder.
> cd rocketseat-exlivery/exlivery
3ยบ Use the command below to download the dependencies.
> mix deps.get
4ยบ Use the command below to run the project.
> iex -S mix
To use Exlivery, follow these steps:
Creating a user and your application. (Age >=18)
> Exlivery.start_agents()
> {:ok, user} = Exlivery.Users.User.build("name", "email", age, "cpf", "address")
> Exlivery.create_or_update_user(user)
Before creating my order I need to tell you what I want in this order.
(Possible Categories :pizza
, :hamburguer
, :carne
, :prato_feito
, :japonesa
, :sobremesa
.)
> {:ok, item} = Exlivery.Orders.Item.build("description-item", category, "price-unity", "quantity")
Creating the order for my user.
> Exlivery.create_or_update_order(%{user_cpf: "cpf", item: [item]})
Generating a report with my user information and their order.
( File name is optional. It is saved inside ./lib/generated-reports/name-report.csv)
> Exlivery.Orders.Report.create("name-report.csv")
To contribute to Exlivery, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <nome_branch>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Send to the original branch:
git push origin Exlivery / <local>
- Create the pull request.
Alternatively, see the GitHub documentation at how to create a pull request..
We thank the following people who contributed to this project:
Joabe Henrique [Author] |
Do you want to be part of this project? Click here and read how to contribute.
This project is under license. See the license file for more details.