Files
mkdocs/docs/Synology/dsm7/node.md
2023-11-14 20:35:51 +01:00

111 lines
2.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Node.js
#### Paquets Synology
```bash
bruno@DS916:/volume1/@appstore/Node.js_v18/usr/local $ cd bin/
total 47520
drwxr-xr-x 1 root root 30 Oct 26 2022 .
drwxr-xr-x 1 root root 18 Oct 26 2022 ..
lrwxrwxrwx 1 root root 45 Oct 26 2022 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x 1 root root 48651256 Oct 26 2022 node
lrwxrwxrwx 1 root root 38 Oct 26 2022 npx -> ../lib/node_modules/npm/bin/npx-cli.js
```
### Installer nvm
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
```
Installer node=lts/fermium (ou mettre-à-jour)
```bash
nvm install --lts=hydrogen
```
Mettre-à-jour npm:
```bash
npm -g install npm
```
Réinstaller les paquets d'une ancienne version après une mise-à jour:
```bash title="Update 14.17.3 depuis 14.17.0"
nvm reinstall-packages 14.17.0
```
### Installer thumbsup
```bash
npm -g install thumbsup
which thumbsup
/var/services/homes/bruno/.nvm/versions/node/v14.17.3/bin/thumbsup
```
```bash
cd /volume1/photo/thumbsup
total 32
drwxrwxrwx+ 1 bruno 138862 286 Mar 15 10:56 .
drwxrwxrwx+ 1 138862 138862 588 Aug 9 08:35 ..
-rwxrwxrwx+ 1 bruno users 487 Mar 14 18:19 config.json
-rwxrwxrwx+ 1 bruno users 487 Mar 15 10:37 config.json.bak
-rwxrwxrwx+ 1 bruno users 440 Mar 12 06:51 config-npm.json
drwxrwxrwx+ 1 root root 126 Dec 5 2020 @eaDir
drwxrwxrwx+ 1 bruno users 144 Mar 15 11:39 .git
-rwxrwxrwx+ 1 bruno users 9 Mar 15 10:56 .gitignore
-rwxrwxrwx+ 1 bruno users 155 Mar 15 10:44 readme.md
drwxrwxrwx+ 1 bruno users 124 Mar 14 12:48 theme-flow
drwxrwxrwx+ 1 bruno users 122 Nov 29 2020 theme-flow-bruno
-rwxrwxrwx 1 bruno users 24 Nov 15 2020 theme_options.json
-rwxrwxrwx+ 1 bruno users 428 Mar 14 11:58 thumbsup.sh
-rwxrwxrwx+ 1 bruno users 365 Mar 15 10:11 thumbsup_update.sh
```
### Configurer thumsup
https://thumbsup.github.io/docs/3-configuration/usage/
```bash title="Configurer Thumsup"
nano config.json
```
```json title="config.json"
{
"input": "/input/Flore",
"output": "/output/gallery",
"exclude": ["_Archived Items/","thumbsup"],
"include-raw-photos": true,
"thumb-size": 250,
"large-size": 1600,
"photo-download": "symlink",
"cleanup": true,
"sort-albums-by": "title",
"sort-media-by": "date",
"sort-media-direction": "desc",
"home-album-name": "Accueil",
"theme-path": "/input/thumbsup/theme-flow/theme",
"title": "Photos...",
"embed-exif": true,
"locale": "fr",
"footer": "bruno@clicclac.info"
}
```

```bash title="Lancer Thumbsup"
thumbsup --config config.json
```