Adding a Node.js Development Website
Although ServBay currently does not support adding Node.js projects directly, you can still add and manage Node.js websites through reverse proxy settings. This article will detail how to add a Node.js website in ServBay, including steps, considerations, and solutions to common problems.
Overview
ServBay provides a user-friendly interface that makes adding and managing websites very simple. By following the steps below, you can easily add a Node.js website in ServBay and configure the necessary settings to ensure the website runs smoothly.
Steps to Add a Website
Step 1: Run the Node.js Project
First, you need to run the Node.js project on the server and specify a port. You can refer to the article [[Using Node.js]] to learn how to run the Node.js project using the built-in Node.js of ServBay.
Suppose you are currently running a Vue.js project, listening on port 8585.
$ npm run dev -- --port 8585
Server running at http://localhost:8585/
2
Step 2: Open the ServBay Management Interface
Find ServBay
in the application, and double-click to open it.
Step 3: Navigate to Host Management
After opening the program, you will see the main interface of ServBay. Click on Host
in the navigation menu on the left. This will take you to the website management page.
Step 4: Add a New Website
On the website management page, click the +
button at the bottom of the page. This will open a new form on the right side to enter the basic information of the new website.
Step 5: Configure Website Settings
On the page for adding a website, you need to fill in the following information:
- Name: The name of the website, used for identification.
- Domain: Enter the domain name of the website you want to add, e.g.,
nodejs.demo
. - Protocol: The supported protocol of the website, default is HTTP/HTTPS.
- SSL Certificate Request Method: It is recommended to choose
Self-signed
, which will be automatically generated and managed by ServBay. - Website Type: Choose
Reverse Proxy
, indicating that the website accesses the Node.js project through reverse proxy. - IP Address: Enter
127.0.0.1
- Port: Enter the port the Node.js project is listening to, e.g.,
8585
.
Step 6: Complete and Save
After filling in all the necessary information, click the Add
button. ServBay will automatically create the configuration for the new website and make the corresponding settings on the host.
Once saved successfully, you can click the browser icon in the top right corner to access the website.
Step 7: Quick Actions
ServBay provides a series of quick action buttons for websites, including:
- Open the website in an IDE for quick editing
- Open the website in a browser
- View website logs
- Pause, start the website
- Delete the website
Summary
Adding a Node.js development website in ServBay is a simple and intuitive process. Although ServBay currently does not support adding Node.js projects directly, you can still easily add and configure Node.js websites through reverse proxy settings. With proper configuration and management, you can ensure the website runs stably in the ServBay environment. If you encounter issues, you can refer to common problems and solutions for troubleshooting and fixing.