【centos使用系列】安装nodejs并初步使用 发表于 2018-08-12 16:37:48 分类于 内部开发者平台 , 操作系统 Valine: node与npm介绍 centos下安装nodejs下载执行脚本curl -sL https://rpm.nodesource.com/setup_10.x | bash - 安装依赖yum install gcc-c++ make 安装nodejsyum install -y nodejs 初步使用node帮助命令 npm帮助命令 npm安装命令 第一个nodejs程序var http=require('http')http.createServer(function(req,res){ res.writeHead(200,{'Content-type':'test/plain'}); res.end('hello,wordl\n');}).listen(1337,'127.0.0.1');console.log('server running at http://127.0.0.1:1337');