Search & Rescue Team Management Platform
-
Install NodeJS. A tool such as Node Version Manager can proove useful for making NodeJS version updates frictionless.
-
Install PostgreSQL
-
Create the
sar
database
CREATE DATABASE sar;
- In the
api
directory, run:
npm install
- 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
- Create the initial database schema
npx knex migrate:latest
- 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
- In a different tab or terminal, navigate to the
api/web
directory and run
npm install
- Start the frontend UI builder via:
npm run serve
- In your browser, navigate to
http://localhost:8080/
Update to the frontend or backend code will cause the corresponding server to automatically restart.