【文件属性】:
文件名称:NodeJS_MVC_with_Doc:**学习**
文件大小:373KB
文件格式:ZIP
更新时间:2021-05-07 17:50:08
HTML
带有Express的Node JS(对于Linux [debian])
安装NodeJs:
sudo apt install nodejs
注意:在某些情况下,您必须手动安装npm (节点程序包管理器)。
npm安装:
sudo apt install npm
检查版本:
node --version
全局更新npm:
sudo npm install -g npm
创建一个节点服务器:
const http = require ( "http" ) ;
const server = http . createServer ( ( req , res ) => {
console . log ( req ) ;
console . log ( res ) ;
// process.exit();
} ) ;
server . listen ( 3000 )