Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 1.25 KB

README.md

File metadata and controls

96 lines (63 loc) · 1.25 KB

OPP

Initialise your development environment

All following commands must be run only once at project installation.

First clone

git clone https://github.com/Terralego/opp-front.git

Install NVM

follow official procedures for nvm

Use your development environment

Always use npm using nvm

nvm install && nvm use  # only once per launched shell
nvm $args

Install

npm ci

Launch dev server

Before launching dev server, you need to define API url

cp public/.env.dist.json public/.end.json

Edit this file, and set api backend url

{
  // example with backend app in dev mode
  "API_PROVIDER": "http://127.0.0.1:8000/api"  
}
npm start

Tests

npm test

Notes

Add Library in mode dev

npm i {nameModule}` -D

Update a specific module

npm update {nameModule}

Mode debug map/layer in browser console

localStorage.debug = 'terralego:*'

how to test locally

build app

npm run build

serve local build

npx serve -s build

WARNING !

In build mode, a frontend proxy should redirect all /api requests to backend application