This repository hosts the Global Fishing Watch client application.
Optional. Start by installing yarn
as package manager:
brew install yarn
Once ready continue installing the required nodejs packages running:
yarn install || npm install
And create a .env
file from the provided sample and set the missing values accordingly
Start the server by running:
yarn start || npm start
You should be able to access your application at http://localhost:3003/
We use BrowserStack to find and fix cross-browser issues.
To compile the project to production environment, you need set the NODE_ENV variable value to production
and
execute the following command.
yarn build
This command generates a build
folder with the files needed to run application in a nginx or apache server.
On server error, the /public/500.html
page should be displayed.
See Workspaces
On load, the application will call the /me API endpoint to load user permissions. These are the supported values:
Allows a user to select a vessel by clicking on it on the heatmap
Allows a user to see a vessel layer (filters by layer type)
Allows a user to see vessel's basic info
Allows a user to see all available vessel info
Allows a user to use the "share" feature
Allows a user to see the map
Allows a user to use the search feature
Allows a user to upload custom layers
Allows a user to report on report-enabled layers
Allows a user to pin a vessel
Returns the length of the new inner extent in days.
A base64-encoded JSON object that represent values to override the currently displayed workspace. See "Workspace override" section
A plain text JSON object that that represent values to override the currently displayed workspace. See "Workspace override" section
A boolean value telling whether the client is in embedded mode (no share, no layers, no menu)
Set to true to allow for a longer max time range.