NodeJS: Difference between revisions
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
== Code Server == | == Code Server == | ||
{| | |||
| valign="top" | | |||
nvm use 14 | nvm use 14 | ||
npm install -g yarn | npm install -g yarn | ||
yarn global add code-server | yarn global add code-server | ||
| valign="top" | | |||
~/.yarn/bin/code-server | ~/.yarn/bin/code-server | ||
mkdir -p ~/.local/share/code-server/logs | |||
vim ~/.config/code-server/config.yaml | vim ~/.config/code-server/config.yaml | ||
|- | |||
| colspan="2" | | |||
---- | |||
|- | |||
| valign="top" | | |||
<source lang="properties"> | <source lang="properties"> | ||
bind-addr: | bind-addr: 127.0.0.1:8080 | ||
auth: node | auth: node | ||
password: academia | password: academia | ||
cert: false | cert: false | ||
</source> | </source> | ||
| valign="top" | | |||
<source lang="properties"> | |||
bind-addr: 127.0.0.1:8080 | |||
auth: password | |||
password: academia | |||
cert: false | |||
</source> | |||
|} | |||
== Firewall == | == Firewall == |
Revision as of 05:27, 20 March 2022
NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
/usr/local/lib ├── [email protected] └── [email protected]
If you wish to uninstall them at a later point (or re-install them under your nvm
Nodes), you can remove them from the system Node as follows:
nvm use system npm uninstall -g a_module sudo npm uninstall -g nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 14 && node -v nvm use system && node -v nvm use 14
Code Server
nvm use 14 npm install -g yarn yarn global add code-server |
~/.yarn/bin/code-server mkdir -p ~/.local/share/code-server/logs vim ~/.config/code-server/config.yaml |
| |
bind-addr: 127.0.0.1:8080
auth: node
password: academia
cert: false
|
bind-addr: 127.0.0.1:8080
auth: password
password: academia
cert: false
|
Firewall
uncomplicated firewall(ufw): systemctl status ufw ufw status verbose ufw disable ufw enable ufw status