![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
node.js
文章平均质量分 63
haolifengwang
好读书,以读书提高自己的修行,达到人生的最终目标。
展开
-
node.js 使用mongoose链接mongodb
//导入mongoose包var mongoose = require('mongoose');//链接本地数据库var DB_URL = 'mongodb://localhost:27017/local';//链接,异步操作mongoose.connect(DB_URL);//注册三个响应mongoose.connection.on('connected',function(){ cons...原创 2018-05-25 22:48:15 · 706 阅读 · 0 评论 -
node.js express ejs
1 安装express 生成器 npm install express-generator -g 1 demo.js var express = require('express'); var ap = express(); app.use(express.static('public')); app.get('/',function(req,res){ res.send('Hell...原创 2018-08-03 15:26:21 · 228 阅读 · 0 评论 -
winston logger
1) Logger.js const winston = require("winston"); require('winston-daily-rotate-file'); const moment = require('moment'); const util = require('util'); const MESSAGE = Symbol.for('message'); const SPL...原创 2018-12-04 19:54:52 · 1043 阅读 · 0 评论