In this section you will learn how to change lynx codebase, run it locally and run test cases.
Lynx is built with phoenix framework. Like other phoenix frameworks, you need the following in order to run it locally:
Please take a look at this list and make sure to install anything necessary for your system. Having dependencies installed in advance can prevent frustrating problems later on.
You can install Elixir using instructions from the Elixir Installation Page, we will usually get Erlang too. If Erlang was not installed along with Elixir, please see the Erlang Instructions section of the Elixir Installation Page for instructions.
The PostgreSQL wiki has installation guides for a number of different systems. But also you can use docker
or podman
to run a PostgreSQL locally.
$ docker run -itd \
-e POSTGRES_USER=lynx \
-e POSTGRES_PASSWORD=lynx \
-e POSTGRES_DB=lynx_dev \
-p 5432:5432 \
--name lyx \
postgres:15.2
$ podman run -itd \
-e POSTGRES_USER=lynx \
-e POSTGRES_PASSWORD=lynx \
-e POSTGRES_DB=lynx_dev \
-p 5432:5432 \
--name lyx \
postgres:15.2
# https://github.com/dbcli/pgcli
$ psql -h 127.0.0.1 -U lynx -d lynx_dev -W
Then clone and run lynx
with the following commands
$ git clone [email protected]:Clivern/Lynx.git lynx
$ cd lynx
$ cp .env.example .env.local
$ export $(cat .env.local | xargs)
To install dependencies
$ make deps
To migrate the database
$ make migrate
To run lynx
$ make run
To run test cases
$ make test