Development Environment
If you want to contribute to Claper, you can set up a development environment on your machine.
Setting up a development environment
To set up a development environment, you need to have the prerequisites installed on your machine.
- Clone the repo
sh
git clone https://github.com/ClaperCo/Claper.git
- Go to the project directory
sh
cd Claper
- Configure your environment variables
sh
cp .env.sample .env
Edit the .env
file to match your configuration.
- Install dependencies
sh
mix deps.get
- Migrate your database
sh
mix ecto.migrate
- Install JS dependencies
sh
cd assets && npm i
- Allow execution of startup file
sh
chmod +x ./dev.sh
- Start Phoenix endpoint with
sh
./dev.sh start
Database
You need a PostgreSQL database running on your machine. You can run it with a Docker container: docker run -p 5432:5432 -e POSTGRES_PASSWORD=claper -e POSTGRES_USER=claper -e POSTGRES_DB=claper --name claper-db -d postgres:15
.
Now you can visit localhost:4000
from your browser.
If you have configured MAIL
environment variable to local
, you can access to the mailbox at localhost:4000/dev/mailbox
.