Created
June 5, 2018 15:19
-
-
Save ratacibernetica/3be7f26de2e844f72e66e20f8bbaa171 to your computer and use it in GitHub Desktop.
Install Node on Centos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Node.js Yum Repository | |
yum install -y gcc-c++ make | |
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash - | |
# Install Node.js and NPM | |
yum install nodejs | |
# Check Node.js and NPM Version | |
npm -v | |
# Create Demo Web Server (Optional) | |
vim demo_server.js | |
# // replace 127.0.0.1 with your domain | |
# var http = require('http'); | |
# http.createServer(function (req, res) { | |
# res.writeHead(200, {'Content-Type': 'text/plain'}); | |
# res.end('Welcome Node.js'); | |
# }).listen(3001, "127.0.0.1"); | |
# console.log('Server running at http://127.0.0.1:3001/'); | |
node --inspect demo_server.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment