网址:sxcpbc.cn
行业资讯

News

联系我们 contact us

稷山县乐盈传动系统有限公司
邮箱:uayecj3@sxcpbc.cn
地址:稷山县

www.sxcpbc.cn

行业资讯 News

当前位置:首页-行业资讯

白色PU食品级输送带在局域网中怎么搭建n
发布时间:2024/8/18 新闻来源:稷山县乐盈传动系统有限公司 浏览次数:434次
稷山县档板皮带厂家在局域网中怎么搭建node服务器?

1.安装nodejs服务(从官网下载安装),node相当于apache服务器

2.在自己定义的目录下新建服务器文件如 server.js

例如,我在E:PhpProjecthtml5websocket下创建了server.js文件

var http = require("http")//引入http模块

//开启服务,监听8888端口

//端口号最好为6000以上

var server = http.createServer(function(req,res){

console.log("有客户端连接")//创建连接成功显示在后台

node.js怎样建个后台服务?

  可以新建server.js文件,代码如下:  var http = require("http")  http.createServer(function (request, response) {  response.writeHead(200, {"Content-Type": "text/html"})   response.end("Woohoo!")  }).listen(8080)  为了方便调试,安装 hotnode  npm install -g hotnode  hotnode server.js


稷山县白色PU食品级输送带

版权所有 稷山县乐盈传动系统有限公司 网址:www.sxcpbc.cn 邮箱:uayecj3@sxcpbc.cn
地址:稷山县