We need to generate secret key for development environment.
mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hfLet's generate User model and controller.
| # Has one external dependency except for Gettext: https://github.com/rrrene/html_sanitize_ex | |
| defmodule MyApp.Gettext do | |
| @doc """ | |
| A helper for translations with links. | |
| Pass in the translation string which must include | |
| `%{link_start}`/`%{link_end}`. For multiple URLs, use | |
| `%{link_start_<0,1,2...>}`. |
| defmodule MyAppWeb.GettextTest do | |
| use ExUnit.Case | |
| import MyAppWeb.Gettext | |
| # A unit test for Gettext translations that checks if the original and the translation | |
| # use the same HTML tags. | |
| # | |
| # Uses Floki to parse HTML. | |
| describe "translations" do |
| { | |
| "lib/**/views/*_view.ex": { | |
| "type": "view", | |
| "alternate": "test/{dirname}/views/{basename}_view_test.exs", | |
| "template": [ | |
| "defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}View do", | |
| " use {dirname|camelcase|capitalize}, :view", | |
| "end" | |
| ] | |
| }, |
| # Requirements | |
| * Python 2.7 | |
| * Google Chrome | |
| * ChromeDriver - WebDriver for Chrome | |
| - Download the latest chromedrive which is 2.28 from here - https://sites.google.com/a/chromium.org/chromedriver/downloads | |
| - Extract and move `chromedriver` file to `/usr/local/bin/chromedriver` | |
| - git clone https://github.com/li-xinyang/OS_FrontendMaster-dl | |
| - cd OS_FrontendMaster-dl |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |