diff --git a/README.md b/README.md index b420bc44f..550e5db73 100644 --- a/README.md +++ b/README.md @@ -8,44 +8,69 @@ Salix is also the scientific name of a beautifull tree! :) Required applications. -* Node.js * Docker * Git -You will need to install globally the following items. -``` -$ sudo npm install -g jest gulp-cli -``` +Optional. + +- NodeJS + + +## Directory structure recommendation +- /Salix + - /back ← this project + - /front ← salix-front project ## Installing dependencies and launching Pull from repository. +```sh +$ git clone [url] [directory] +``` Run this commands on project root directory to install Node dependencies. -``` -$ npm install -$ gulp install +```sh +$ sh init.sh ``` Launch application in developer environment. +```sh +$ docker compose -f docker-compose.local.yml up ``` -$ gulp + +With NodeJS +```sh +$ npm run start ``` Manually reset fixtures. -``` -$ gulp docker +```sh +$ docker compose -f docker-compose.local.yml up --build ``` +With NodeJS +```sh +$ npm run restart +``` ## Running the unit tests For client-side unit tests run from project's root. +```sh +$ sh runTestFront.sh ``` + +With NodeJS +```sh $ npm run test:front ``` For server-side unit tests run from project's root. +```sh +$ sh runTestBack.sh ``` + +With NodeJS +```sh $ npm run test:back ``` diff --git a/init.sh b/init.sh index 0770c08b5..41ad61389 100644 --- a/init.sh +++ b/init.sh @@ -2,6 +2,6 @@ sudo docker run --rm -it \ -w /salix \ -v $PWD/../salix:/salix \ node:20-bullseye \ - npm i -g gulp-cli \ - npm i \ + npm i -g gulp-cli && \ + npm i && \ gulp i