Skip to content

alvin-qh/study-node

Repository files navigation

Study node.js

Setup

Install node.js

$ brew install node

Using npm China proxy

$ npm config set registry https://registry.npm.taobao.org

Install nvm

Download and install

  • Use curl
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
  • Or use wget
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

Set environment

  • Modify ~/.bashrc (or ~/.zshrc or ~/.bash_profile), and add the following content:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

Use jupyter lab

1. Make python virtualenv

$ pyenv local 3.7.5         # if use pyenv
$ python -m venv .venv --prompt='study-nodejs'
$ source .venv/bin/activate

2. Install python package

$ pip install jupyterlab
$ pip install jupyter_nbextensions_configurator

3. Install tslab

3.1. Install tslab to nodes

$ npm install -g tslab

3.2. Install to jupyter

In virtualenv, run command:

$ tslab install [--python=python3]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published