The Nerves Metal Detector is an application with the goal to show all Nerves Framework supported hardware, where to buy it and its availability.
Contributions that add new vendors, products and product update items (vendor-item relation) are greatly welcome.
See the CONTRIBUTING document for detailed information. Especially the section about adding the items from rpilocator.com.
The project is a standard Phoenix Framework application.
The docker-compose.yml
in the root folder defines a simple Postgres Docker container.
Run docker-compose up
to start the database.
Any other way of running a Postgres database works as well.
To start the Phoenix server:
.envrc.dist
available. When using direnv, copy the file to .envrc
and run direnv allow .
mix setup
to install and setup dependenciesmix phx.server
or inside IEx with iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Product availabilities are updated every hour via an Oban
cronjob.
The updates can be manually scheduled by running the server in an iex session
and scheduling the NervesMetalDetector.Jobs.ScheduleProductUpdates
job.
$ iex -S mix phx.server
iex(1)> NervesMetalDetector.Jobs.ScheduleProductUpdates.new(%{}) |> Oban.insert()