All following commands must be run only once at project installation.
git clone https://github.com/Terralego/opp-front.git
follow official procedures for nvm
nvm install && nvm use # only once per launched shell
nvm $args
npm ci
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
npm test
npm i {nameModule}` -D
npm update {nameModule}
localStorage.debug = 'terralego:*'
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