This also adds your application to PM2's process list, which is outputted every time you start an application: Output: The first thing you will want to do is use the pm2 start command to run your application, hello.js, in the background: pm2 start hello.js Use this command to install PM2: sudo npm install -g We will use Node Packaged Modules (NPM), which is basically a package manager for Node modules that installs with Node.js, to install PM2 on our app server. PM2 provides an easy way to manage and daemonize applications (run them as a service). Now we will install PM2, which is a process manager for Node.js applications. Now start the web server using the below command # node -debug test_server.js debugger listening on port 5858 Http.createServer( function ( req, res) ) Then add the following content in the file. You can test your installation by creating a test file, say test_server.js # vim test_server.js Having installed the packages, you need to check their versions. # yum install nodejs Step 3: Verify versions This single command will install node.js, npm and also other dependent packages. Now it’s time to install the node.js package and NPM package. # yum install -y gcc-c++ make # curl -sL https: ///setup_6.x | sudo -E bash - Step 2: Install node.js and NPM Run the following commands in succession to add the yum repository. Step 1: Add node.js yum repositoryįirst we need to add yum repository of node.js to our system which is sourced from nodejs’ official website. In this article we will explain the steps of installing node.js and npm in CentOS. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |