Using Node.js
What is Node.js?
Node.js is a JavaScript runtime environment based on the Chrome V8 engine. It uses an event-driven, non-blocking I/O model, making it lightweight and efficient. Node.js's package manager, npm, is one of the largest open-source library ecosystems globally.
Support for Node.js in ServBay
ServBay offers support for multiple versions of Node.js, ensuring you can choose the right version for development and deployment according to your project needs. Here are some common Node.js versions supported by ServBay:
- Node.js 12.x
- Node.js 13.x
- Node.js 14.x
- Node.js 15.x
- Node.js 16.x
- Node.js 17.x
- Node.js 18.x
- Node.js 19.x
- Node.js 20.x
- Node.js 21.x
- Node.js 22.x
- Node.js 23.x
These versions cover both long-term support (LTS) versions and the latest current versions, ensuring you can choose the most suitable version for development.
Installation Method
You can easily install and manage Node.js through ServBay's GUI panel. Here are the steps to install Node.js via the ServBay GUI panel:
- Open the ServBay GUI panel.
- Navigate to the
Services
section. - Select the Node.js version you need.
- Click the green
Install
button and wait for the installation to complete.
Included Modules
ServBay provides several package managers for Node.js to help manage project dependencies:
- npm (Node Package Manager): The default Node.js package manager, most widely used.
- pnpm: An efficient package manager that saves disk space and speeds up installation.
- yarn: A package manager developed by Facebook, offering stable and efficient dependency management.
Enabling Node.js Package Managers
In the ServBay environment, you can enable these package managers as follows:
- npm: Installed and enabled by default, no extra configuration needed.
- pnpm: Installed and enabled by default, no extra configuration needed.
- yarn: Installed and enabled by default, no extra configuration needed.
For detailed usage tutorials, refer to the following links:
Tutorials
ServBay offers comprehensive Node.js framework tutorials covering both frontend and backend development. Here are tutorials for some common frameworks:
Frontend Frameworks
- Vue.js: A progressive JavaScript framework for building user interfaces. Detailed tutorial at Create and Run Vue.js Project.
- React: A JavaScript library for building user interfaces. Detailed tutorial at Create and Run React Project.
- Angular: A framework for building dynamic web applications. Detailed tutorial at Create and Run Angular Project.
- Next.js: A framework for building server-side rendered React applications. Detailed tutorial at Create and Run Next.js Project.
- Nuxt.js: A framework for building server-side rendered Vue.js applications. Detailed tutorial at Create and Run Nuxt.js Project.
Backend Frameworks
- Express.js: A minimal and flexible Node.js web application framework. Detailed tutorial at Create and Run Hapi.js Project.
- Koa.js: A new generation Node.js framework developed by the Express team. Detailed tutorial at Create and Run Koa.js Project.
- NestJS: A framework for building efficient, scalable server-side applications. Detailed tutorial at Create and Run NestJS Project.
- Hapi.js: A powerful and flexible framework for building applications and services. Detailed tutorial at Create and Run Hapi.js Project.
- LoopBack: A highly extensible Node.js framework for building APIs and microservices. Detailed tutorial at Create and Run LoopBack Project.
- Socket.io: A JavaScript library for real-time bidirectional event-driven communication. Detailed tutorial at Create and Run Socket.io Project.
With the above tutorials, you can quickly get started and use these popular frameworks for development with the help of ServBay.