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 in the world.
ServBay's Support for Node.js
ServBay supports various versions of Node.js, ensuring you can choose the appropriate version for development and deployment based on your project requirements. Here are some common versions of Node.js 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
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.
Bundled Modules
ServBay provides several package managers for Node.js, making it convenient to manage project dependencies:
- npm (Node Package Manager): The default Node.js package manager and the most widely used.
- pnpm: An efficient package manager that saves disk space and speeds up installation.
- yarn: A package manager developed by Facebook that offers 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 additional configuration required.
- pnpm: Installed and enabled by default, no additional configuration required.
- yarn: Installed and enabled by default, no additional configuration required.
Detailed usage tutorials can be found at the following links:
Usage Tutorials
ServBay provides 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: Create and Run Vue.js Project.
- React: A JavaScript library for building user interfaces. Detailed tutorial: Create and Run React Project.
- Angular: A framework for building dynamic web applications. Detailed tutorial: Create and Run Angular Project.
- Next.js: A framework for building server-rendered React applications. Detailed tutorial: Create and Run Next.js Project.
- Nuxt.js: A framework for building server-rendered Vue.js applications. Detailed tutorial: Create and Run Nuxt.js Project.
Backend Frameworks
- Express.js: A minimal and flexible Node.js web application framework. Detailed tutorial: Create and Run Express.js Project.
- Koa.js: A next-generation Node.js framework developed by the team behind Express. Detailed tutorial: Create and Run Koa.js Project.
- NestJS: A framework for building efficient, scalable server-side applications. Detailed tutorial: Create and Run NestJS Project.
- Hapi.js: A powerful and flexible framework for building applications and services. Detailed tutorial: Create and Run Hapi.js Project.
- LoopBack: A highly extensible Node.js framework for building APIs and microservices. Detailed tutorial: Create and Run LoopBack Project.
- Socket.io: A JavaScript library for real-time, bidirectional event-driven communication. Detailed tutorial: Create and Run Socket.io Project.
With these tutorials, you can quickly get started and use these popular frameworks for development with the help of ServBay.