There are two ways of installing Mercur: the
CLI script or manual installation.
Follow these steps to install and run Mercur backend on your operating system:Step 1: Clone the Mercur repository:
Copy
git clone https://github.com/mercurjs/mercur.git
Step 2: Navigate to the Mercur directory and execute the following commands:
Copy
cd mercuryarn installyarn build
Step 3: Go to the backend directory and prepare .env file
Copy
cd apps/backendcp .env.template .env
Step 4: Configure database credentials in the .env file
Copy
# Replace user, password, address and port parameters with your valuesDATABASE_URL=postgres://[user]:[password]@[address]:[port]/$DB_NAME# For example:DATABASE_URL=postgres://postgres:postgres@localhost:5432/$DB_NAME
Do not delete $DB_NAME from the connection string. You’ll be prompted to
choose database name during the next step.