- NodeJs v16, you can use
nvm
to use the version specify in the.nvmrc
file.
You can lauch the backend with or withour docker. To configure each of these methods you must have 2 different env file :
docker.env
.env
Copy and rename docker.env.example
and .env.example
.
Label depends on 2 other services from the Cour de cassation : dbsder-api and nlp-pseudonymisation-api. You can lauch these services locally to simulate operation close to production or you can disable theses services from env files. In this case these 2 services are emulated by Label with the storage folder. To do so, follow the Add documents you want to annotate
step in the reuser guide or just rename the storage-example
folder to storage
.
Install dependencies with:
yarn
To lauch the frontend run:
yarn start:client:dev
Then, on your web browser, open http://localhost:55432
Build the backend with:
yarn docker:build:backend
Start the backend with:
yarn docker:start:backend
Start the database:
yarn docker:start:db
Start the backend:
yarn start:backend:dev
You can init database with :
yarn init:db
This script is lauch with the .env
configuration.
Label contains many scripts, they are listed here You can launch scripts with theses commands :
docker container exec -it label-backend-1 sh -c "cd packages/courDeCassation; sh scripts/runLocalScript.sh ./dist/scripts/myScript.js --myArgument"
scripts/runScriptLocally.sh "myScript.js --myArgument"