How to deploy on the server when using nodejs as the middle tier

use vue as the project, and use node as the middle layer to deal with the data returned by the background interface. Online is how to deploy node-related code. For example, when you are local, you want to start node and how to handle it on the server. Do some plug-ins that node depends on need to be installed on the server

Mar.02,2021

1. If your node process itself does not have a daemon implementation, you can deploy it with pm2 .
2. To install dependencies on the production environment, and if there are external system dependencies, install them.


on the server, the same should be done. Install the required middleware in the node_modules at the same level as the file served by server.js.

Menu