Skip to content

MapQaTor/mapqator-backend

Repository files navigation

MapQaTor Backend

Project Setup

Follow the step by step installation procedure to install and run this on your machine.

Prerequisites

Make sure you have node and postgresql installed in your device.

  • NodeJs: Install Nodejs from here
  • PostgreSQL Install PostgreSQL from here

Installation

  1. Clone the repo
git clone https://github.com/mapqator/mapqator-backend.git
  1. If you don't have git installed in your device then download zip
  2. After installation or download go to the repository and open command line.

Configuring Backend

Install NPM packages

npm install

Configuring Database

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

Setting up the environment variables

Rename the .env.example file to .env and update the values as per your configuration.

We are finally good to go.

Run the project

Go to your favourite code editor and run

npm start

You should find that the project is working!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published