refs #5739 feat: init.sh refactor(readme): add new commands
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2024-01-16 09:54:04 +01:00
parent 9bb0261897
commit aefef1bfa6
2 changed files with 38 additions and 13 deletions

View File

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

View File

@ -2,6 +2,6 @@ sudo docker run --rm -it \
-w /salix \ -w /salix \
-v $PWD/../salix:/salix \ -v $PWD/../salix:/salix \
node:20-bullseye \ node:20-bullseye \
npm i -g gulp-cli \ npm i -g gulp-cli && \
npm i \ npm i && \
gulp i gulp i