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 installpsql -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 database\schema.sqlAn empty database will be created with the name mapqator and the schema will be created. Note: Ignore errors related to supabase if you are setting up a local database.
If you want the cached data that was used for MapEval benchmark you should use: psql -U postgres -d mapqator -a -f database\dump.sql instead of psql -U postgres -d mapqator -a -f database\schema.sql.
If you plan to host the frontend as well, 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_passwordRename 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 startYou should find that the project is working!