Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 3.59 KB

README.md

File metadata and controls

99 lines (70 loc) · 3.59 KB

Imagery Coordination

This repo is a new application for the coordination of imagery requests for HOT activations and other general non-activation imagery needs for humanitarian OSM mapping. The repo contains code for the application as well as an issue queue for discussions and addressing other needs related to the application.

For any urgent request and to participate in or to speak with the imagery coordination group, join the live chat here join the chat at https://gitter.im/hotosm/imagery-requests or email imagery-coord[AT]hotosm.org

Go to https://coordination.openaerialmap.org to view open requests.

Please use the provided template to submit a request in the issue section of this repo.

Installation and Usage

The steps below will walk you through setting up your own instance of the imagery-request.

Install Project Dependencies

To set up the development environment for this website, you'll need to install the following on your system:

  • Node v4.5 (To manage multiple node versions we recommend nvm)

Install Application Dependencies

If you use nvm, activate the desired Node version:

nvm install

Install Node modules:

npm install

Usage

Config files

All the config files can be found in app/assets/scripts/config. After installing the projects there will be 3 main files:

  • local.js - Used only for local development. On production this file should not exist or be empty.
  • staging.js
  • production.js

The production.js file serves as base and the other 2 will override it as needed:

  • staging.js will be loaded whenever the env variable DS_ENV is set to staging.
  • local.js will be loaded if it exists.

The following options must be set: (The used file will depend on the context)

  • auth0Client - The Auth0 client id.
  • auth0Domain - The Auth0 domain.
  • mbToken - The token for mapbox.
  • api - Url of the Imagery Requests Api

Example:

module.exports = {
  auth0Client: 'qTQW5L362p0DWpuNAcx5SHggOY1p65bG',
  auth0Domain: 'danielfdsilva.eu.auth0.com',
  mbToken: 'pk.eyJ1IjoiZGV2c2VlZCIsImEiOiJnUi1mbkVvIn0.018aLhX0Mb0tdtaT2QNe2Q',
  api: 'https://imagery-requests-staging.herokuapp.com'
};

Starting the app

npm run serve

Compiles the sass files, javascript, and launches the server making the site available at http://localhost:3000/ The system will watch files and execute tasks whenever one of them changes. The site will automatically refresh since it is bundled with livereload.

Auth0 setup

To setup authentication with Auth0 follow the steps listed in the imagery-requests-api repo.

Config

Copy the Client ID and Domain to the appropriate config file.

  auth0Client: '',
  auth0Domain: '',

Development data

During development a dummy app exists (only internally) and the following users are available:

Deployment

To prepare the app for deployment run:

npm run build

This will package the app and place all the contents in the dist directory. The app can then be run by any web server.