English - Tiếng Việt
Install Nest.js and related softwares
This document is for Linux.
Other operating system: Windows - macOS
Table of contents
Installation
Node.js
Node.js is a server environment to run application written in Javscript. Nest.js is a framework on Node.js.
To install Node.js:
- Download Node.js binaries at https://nodejs.org/en/download
- Unzip the downloaded file
- Copy folders in extracted folder to
/usr
Or install by package manager: https://nodejs.org/en/download/package-manager
After installation, verify by this command, if the versions of npm
and node
are displayed then the installation is success.
node --version
npm --version
Nest.js
Install Nest.js by the command
npm i -g @nestjs/cli
After installation, verify by this command, if the version of nest
is displayed then the installation is success.
nest --version
Postman
Postman is a tool to work with APIs in order for testing and building the APIs.
To install it:
- Download the installer at https://www.postman.com/downloads/
- Unzip the downloaded file
- Create a desktop icon and save as
~/.local/share/applications/Postman.desktop
with below file content (replace/path/to/Downloads
to the path to the folder containing extracted folder):
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=/path/to/Downloads/Postman/app/Postman %U
Icon=/path/to/Downloads/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
Or run the command (Snap store is required):
snap install postman
Note:
- Supported Linux distributions: Ubuntu 14.04 (and newer), Fedora 24, Debian 8 (and newer).
- Permission to read/write to
~/.config
is needed for Postman to store information. - With Ubuntu 18, please install package
libgconf-2-4
with the commandapt-get install libgconf-2-4
- Detailed instructions: https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
Database
Nest.js applications may need to work with database. To install one of commonly used database, please refer to below links:
- MySQL: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/
- MongoDB: https://www.mongodb.com/docs/manual/installation/#mongodb-installation-tutorials
- PostgreSQL: https://www.postgresql.org/docs/current/installation.html