A Phoenix Framework 1.0 pre-launch example application.
Use as a placeholder to promote an upcoming site and gauge interest by collecting email addresses.
The application stores new signup email addresses in a Postgresql database and sends a welcome email with Mailgun.
Click Login
to enter your admin details (located in priv/repo/seeds.ex
) to view or download a CSV file of signed up emails.
- Add config listed environment variables to
.profile
export MAILGUN_KEY="my_mailgun_api_key"
export MAILGUN_DOMAIN="my_mailgun_domain"
- Clone, compile with dependencies and run the migrations
git clone https://github.com/mutablestate/preview.git
mix do deps.get, compile
mix ecto.create
mix ecto.migrate
- Add the admin user
Customize the username and password
# priv/repo/seeds.ex
user = %{
email: "yoda@example.com",
password: Comeonin.Bcrypt.hashpwsalt("usetheforce")
}
Run mix run priv/repo/seeds.ex
from the Preview root directory
- Setup the mailer
Customize the welcome email message sent to signups by changing these lines
# lib/preview/mailer.ex
@from : "yoda@example.com"
subject: "Preview registration",
html: "<p>Welcome to Preview!</p>"
- Start the Phoenix server
Run mix phoenix.server
from the Preview root directory
Visit http://localhost:4000 in your browser
- The
node_modules
folder is gitignored, re-install withnpm install
.
- An opinionated starting point to develop Elixir / Phoenix sites
- Use the latest stable Phoenix release
- Discover, learn and have fun!
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Congratulations to the Phoenix team on hitting 1.0!
MIT