随笔分类 -  node.js

node相关的问题
摘要:/** * Created by Administrator on 2016/7/12. * 流数据 */ var fs = require('fs'); var stream = fs.createReadStream('./obd.json'); var data = ""; stream.on 阅读全文
posted @ 2016-08-30 17:37 钟离野 阅读(2794) 评论(0) 推荐(0)
摘要:1 const I = 3.4893589; 2 console.log(Number.parseInt(I)); 3 console.log(Number.parseFloat(I)); 4 console.log(Number.isInteger(I));//是否为整数 5 console.log(Math.trunc(I)); //去除一个数的小数部分 6 //Math.si... 阅读全文
posted @ 2016-08-29 16:33 钟离野 阅读(167) 评论(0) 推荐(0)
摘要:1 /** 2 * Created by Administrator on 2016/8/29. 3 */ 4 const http = require("http"); 5 const hostname = '127.0.0.1'; //主机名 6 const port = 8080; //端口号 7 const server = http.createServer((r... 阅读全文
posted @ 2016-08-29 16:31 钟离野 阅读(275) 评论(0) 推荐(0)