diff --git a/README.md b/README.md index c29603a4b..fc3d0ac91 100644 --- a/README.md +++ b/README.md @@ -40,36 +40,67 @@ and run a local server. This section shows you how. ### Install Node.js -[Node.js](https://nodejs.org/en/download) version 16.14 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed. +[Node.js](https://nodejs.org/en/download) version 16.14 or above required, please see more details for [Node.js official supported version](https://endoflife.date/nodejs). -### Install yarn +> [!NOTE] +> Aligned with [official download](https://nodejs.org/en/download), using `nvm` and `npm` installation is recommended. + +- using `nvm` with `npm` +```shell +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +nvm install 22 +node -v ``` + +If you want to install `apt` package on Ubuntu. + +- `apt` + +```shell +curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash - +sudo apt install -y nodejs +node -v +``` + +### Install yarn + +- `npm` + +```shell npm install -g yarn ``` -### Install dependencies +- `apt` +```shell +curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +sudo apt update +sudo apt install -y yarn ``` -cd website +### Install dependencies + +```shell +cd website yarn ``` ### Local Development -``` -$ yarn start +```shell +yarn start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. -Your website is at [http://localhost:3000/](http://localhost:3000/) +Your website is at [http://localhost:3000/](http://localhost:3000/). (You can also use `--host` option to bind the IP address instead of `localhost`.) ### Build -``` -$ yarn build +```shell +yarn build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service.