https://github.com/cloud8421/shop
Example application to explore dependency injection
https://github.com/cloud8421/shop
Last synced: about 1 month ago
JSON representation
Example application to explore dependency injection
- Host: GitHub
- URL: https://github.com/cloud8421/shop
- Owner: cloud8421
- Created: 2018-05-10T06:49:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T16:45:22.000Z (over 7 years ago)
- Last Synced: 2025-03-02T13:26:25.434Z (over 1 year ago)
- Language: Elixir
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shop
# Lightweight dependency injection
## Intro
The aim of this tutorial is to outline a basic approach for dependency injection that can be used to write easily testable, side-effect rich code.
The codebase we will be working on is written in Elixir, but techniques can be applied to other BEAM languages as well.
The project requires Elixir >= 1.6.0.
After cloning the repository, we can checkout the `starter` branch and run:
`mix do deps.get, compile`
A basic integration test is included, which can be run with `mix test`.
## Example application
The application represents the a shop api, divided into two main components: a simple `store` (which is responsible to create and manipulate products) and a `front` api which provides a few JSON endpoints.
## Features
- Create new products via the API
- Fetch and filter products
- Fetch a report about products' general properties