In which Joe explores the wild world of Elixir n' Phoenix.
I'ma learn me some Elixir n' Phoenix. I'm gonna dedicate the month of October to getting better at Elixir, and to getting a working Elixir app deployed.
I plan on putting at least 2 hours a week into this.
If you know any Elixir, feel free to leave comments about my rookie mistakes.
Thanks!
Have you ever wanted to sell/give something away online, but then you have go through the work of posting on Craigslist, Nextdoor, Kijiji, Freecycle, etc.?
Well MegaMerchant©®™ will be a one-stop shop to manage your ads! Post ads to multiple sites, edit them, and delete them once they're not needed! All in one simple place.
MegaMerchant™®© will make use of any available APIs for these sites, and if they don't have one... I guess it'll use some Elixir equivalent of Mechanize, Watir, or something else along those lines.
Install Node.js dependencies with npm install
"IEX" = "Interactive Elixir"
Generate model, migration, controller, view, and templates:
mix phoenix.gen.html Ad ads title:string description:string price:decimal
Start console with dependencies:
iex -S mix
Find all Users in database:
MegaMerchant.Repo.all(MegaMerchant.User)
Install dependencies:
mix deps.get
Run them tests:
mix test
List Phoenix routes:
mix phoenix.routes
Start Phoenix endpoint:
mix phoenix.server
Start server with dependencies:
iex -S mix phoenix.server
Now you can visit localhost:4000
from your browser.
Configuration:
config/dev.exs
Run migrations:
mix ecto.migrate
-
Official website: http://www.phoenixframework.org/
-
Mailing list: http://groups.google.com/group/phoenix-talk
-
Elixir: http://elixir-lang.org/docs/stable/elixir/Kernel.html