Genx is a template project with everything configured so that one can just
copy the whole folder structure, change template
to the project name on file
names and contents and call it a startup for a brand new project.
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
If you want to contribute to this repo, the process is simple:
- Go to master branch with
git checkout master
- Update it with
git pull
- Create a new branch for your feature with
git checkout -b <your-branch>
- Do you changes, keeping the change set small for each commit
- Run the tasks that update the code (like the formatter) with
mix code.update
- Check your code with
mix code.check
. If this one fails and you have to fix the code, go back to step 4 - Stage and commit your changes with
git add . & git commit
- Push the changes to origin with
git push -u origin <your-branch>
- Repeat steps 4 to 9 until it's done
- Open a pull request
There is also a useful pre-commit
git hook that runs mix code.check
before a
commit. If it fails it will block the commit. To install it just:
cp .git_hooks/pre-commit .git/hooks/
chmod +x .git/hooks/pre-commit