/SAR-Management

Search & Rescue Team & Equipment Management

Primary LanguageVue

SAR Management

Search & Rescue Team Management Platform

Installation

  1. Install NodeJS. A tool such as Node Version Manager can proove useful for making NodeJS version updates frictionless.

  2. Install PostgreSQL

  3. Create the sar database

CREATE DATABASE sar;
  1. In the api directory, run:
npm install
  1. Setup postgres connection - by default the server will attempt to connect to postgres using the following:
postgres://postgres@localhost:5432/sar

If you are not using the default path, set the postgres connection string by modifying and running the following

export POSTGRES=postgres://postgres@localhost:5432/sar
  1. Create the initial database schema
npx knex migrate:latest
  1. Run the backend server with optional .env file

In the api/ directory create a file with the name .env and the following sample contents:

{
    "API2PDF": "<Token>",
    "MailGun": "<Token>",
    "SPACES_KEY": "<Token>",
    "SPACES_SECRET": "<Token>",
    "SPACES_BUCKET": "<Bucket>"
}
npm run dev

If the server started successfully you should see the following message:

ok - http://localhost:4999
  1. In a different tab or terminal, navigate to the api/web directory and run
npm install
  1. Start the frontend UI builder via:
npm run serve
  1. In your browser, navigate to http://localhost:8080/

Update to the frontend or backend code will cause the corresponding server to automatically restart.