Follow the step by step installation procedure to install and run this on your machine.
Make sure you have node and postgresql installed in your device.
- Clone the repo
git clone https://github.com/mapqator/mapqator-backend.git
- If you don't have git installed in your device then download zip
- After installation or download go to the repository and open command line.
Install NPM packages
npm install
psql -U postgres -c "CREATE DATABASE mapqator;"
psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE mapqator TO postgres;"
psql -U postgres -d mapqator -a -f schema.sql
An empty database will be created with the name mapqator
and the schema will be created. You need to create an user to login to the website. For that you need to add an entry in the users
table.
psql -U postgres -d mapqator -c "INSERT INTO users (username, password) VALUES ('your_username', '******');"
Replace ******
with the hashed password. You can use the following command to generate a hashed password.
node services\password.js your_password
Rename the .env.example
file to .env
and update the values as per your configuration.
We are finally good to go.
Go to your favourite code editor and run
npm start
You should find that the project is working!