commit | 2afdb5acc1dec8f695f6fdf42f8eb3394095e3d4 | [log] [tgz] |
---|---|---|
author | Sébastien Blin <sebastien.blin@savoirfairelinux.com> | Wed Jun 14 14:56:11 2023 -0400 |
committer | Sébastien Blin <sebastien.blin@savoirfairelinux.com> | Wed Jun 14 14:56:46 2023 -0400 |
tree | 28515931867add58f67555094ece2fa47a5a4843 | |
parent | 1f5705a753c97d56b5c161302eae00400d918510 [diff] |
Jenkinsfile: use main branch Change-Id: I09989452b2ffb1ef5d72ff25ad4df3ae1cc407bc
The idea is to provide the user a quick way to discover and install plugins via the plugin store.
how to install Node.js 18.16 with nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"\n[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
$ command -v nvm
how to install Node.js 18.16 with nvm
$ nvm install 18.16.0
run the server
$ npm run start
lint
$ npm run lint
fix the linting
$ npm run fix
run tests and see code coverage
$ npm run test
$ curl -X GET http://localhost:3000/
$ curl -X GET http://localhost:3000/details/AudioFilter
$ curl -X GET http://localhost:3000/download/WaterMark.jpl
We have a set of ESLint rules that define clear syntax rules (/.eslintrc.json). You will need the following tools:
We will not accept patches introducing non-ESLint-compliant code.
To install Docker please read this manual: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
The Docker needs a data directory to store the plugins. You need a /data/ folder in your repo. The API will look for the plugins in this folder. This is a temporary situation until we have a database implemented.
Build a docker image:
docker build -t server-image --target server .
Run the docker container:
docker run -p 3000:3000 -ti server-image
To stop the container do CTRL + C in the terminal.
To run tests in the docker container
Build the test image:
docker build -t test-image --target test .
Run the test image:
docker run test-image
Set up the pre-commit hook:
In the root directory of your Git repository, navigate to the .git/hooks
folder. Create or edit the pre-commit file (with no file extension) in that folder.
If you only want to use our pre-commit hook:
cp ./extras/scripts/pre-commit.sh .git/hooks/pre-commit chmod +x ./git/hooks/pre-commit chmod +x .extras/scripts/pre-commit