https://github.com/mgerb/elixir-playground
Playing around with elixir/phoenix web server
https://github.com/mgerb/elixir-playground
Last synced: about 1 month ago
JSON representation
Playing around with elixir/phoenix web server
- Host: GitHub
- URL: https://github.com/mgerb/elixir-playground
- Owner: mgerb
- Created: 2017-12-31T18:06:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T19:17:47.000Z (over 8 years ago)
- Last Synced: 2025-10-30T06:45:44.895Z (9 months ago)
- Language: Elixir
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MyApp
## Generate a new app
`mix phx.new myapp --module MyApp --no-brunch --no-html --database postgres`
## Start the server
* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`
* Start Phoenix endpoint with `mix phx.server`
## Production
Ready to run in production? Please [check our deployment guides](http://www.phoenixframework.org/docs/deployment).
# Ecto
## Create table
`mix ecto.gen.migration create_user`
`mix ecto.migrate`
## Prod
Running app
`PORT=80 MIX_ENV=prod mix phx.server`
- when creating prod database
- `MIX_ENV=prod mix ecto.create`
- `MIX_ENV=prod mix ecto.migrate`
## Installing Elixir on C9
```
# for some reason C9 complains this file is missing when it tries to remove couchdb
sudo touch /etc/init.d/couchdb
sudo apt-get install inotify-tools
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
sudo apt-get update
sudo apt-get install esl-erlang
sudo apt-get install elixir
mix local.hex
```