expected v0.1.1 mix expected.mnesia.setup View Source

Creates the Mnesia table for Expected.

To set up the Mnesia table for login storage, configure it in your config.exs:

config :expected,
  store: :mnesia,
  table: :logins,
  ...

Then, simply run this mix task:

$ mix expected.mnesia.setup

If you use to start your IEx development sessions with a node name, you must also run expected.mnesia.setup with the same node name to effictively create the Mnesia table on the good node:

$ elixir --sname "my_node@my_host" -S mix expected.mnesia.setup

Configuration

By default, the Mnesia files will be stored in Mnesia.nonode@nohost in your project directory. You can add this directory to your .gitignore. If you want to store them elsewhere, you can configure Mnesia in your config.exs:

config :mnesia,
  dir: 'path/to/dir'  # Note the simple quotes, Erlang strings are charlists ;-)

For more information about Mnesia and its configuration, please see :mnesia in the Erlang documentation.

Link to this section Summary

Functions

A task needs to implement run which receives a list of command line args

Link to this section Functions

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.