In this repository, I will learn how to build a Trello-like project management application using Elixir, Phoenix framework and React. I follow the tutorial Trello tribute with Phoenix and React by Ricardo García Vega.
mix deps.get
mix ecto.create && mix ecto.migrate
npm install
mix phoenix.server
Then visit localhost:4000
from your browser.
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix
-
Comparing Rails and Phoenix: Part I by Leigh Halliday
-
Rails CLI Commands for Elixir & Phoenix by Alex Weidmann
-
mix
is likebundle
but alserake
Phoenix | Rails | |
---|---|---|
mix phoenix.new <app_name> | rails new <app_name> | |
mix deps.get, npm install | bundle install | |
mix phoenix.gen.html User users name username:string | rails g scaffold User name username:string | |
mix phoenix.gen.json User users name username:string | ||
mix phoenix.gen.model User users name username:string | rails g model User name username:string | |
mix ecto.create | rails db:create | |
mix ecto.migrate | rails db:migrate | |
mix ecto.drop | rails db:drop | |
mix run priv/repo/seeds.exs | rails db:seed | |
mix phoenix.routes | rails routes | |
mix.exs, package.json | Rakefile | |
mix phoenix.server | rails server | |
iex -S mix | rails console | |
mix test | rails test |
And much much more
-
Promise object is used for asynchronous computations.
-
Promise object represents a value which may be available now, or in the future, or never.
-
The 3 states of a promise:
- pending => The initial state of a promise.
- fulfilled => The state of a promise representing a successful operation.
- rejected => The state of a promise representing a failed operation.
-
Once a promise is fulfilled or rejected, it will be immutable.
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
When things act strange after modifying asset configurations, just reinstalling may fix it.
rm -rf node_modules && npm install