Skip to content

manukall/phoenix_token_auth_react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhoenixTokenAuthReact

This is an example app using Phoenix, phoenix_token_auth and React.

Branch master uses phoenix_token_auth's latest hex release and branch development might use a more current version of phoenix_token_auth's master branch.

You need to have a (free) mailgun account to be able to send welcome emails. You'll need to know your mailgun domain, and HTTP API key.

Running

  • Clone the repository and change into it's directory
  • Install dependencies:
mix deps.get && npm install
  • Create and migrate the database (You might also need to change the DB username/password in config/dev.exs before you try to run the DB creation and migration tasks.)
mix do ecto.create, ecto.migrate
  • Add some example data
mix seed_db
  • Configure a real mail user, in the same domain as the mailgun domain you configured, in config/config.exs.
    config :phoenix_token_auth,
      ...
      email_sender: "somebody@your-mailgun-domain.org",
      ...
  • Start the server
MAILGUN_DOMAIN=... MAILGUN_KEY=... mix phoenix.server

Testing

In order to run mix test, which makes use of Hound for testing, you need a local webdriver server to be running. You can find simple instructions at https://github.com/HashNuke/hound/wiki/Starting-a-webdriver-server

On OS X with Firefox and Homebrew installed you may install the Selenium web driver and follow the instructions for running it:

brew install selenium-server-standalone

You may also need to change the DB username/password in config/test.exs before you try to run the tests.

Credits

A lot of inspiration and code were taken from https://github.com/FancyPixel/small-frontend.

About

Example app for phoenix_token_auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published