随笔分类 - node
摘要:把网页转成pdf文件 1、目录结构 node-pdf node_modules test businesscard.html app.js 2、app.js
阅读全文
摘要:var express = require('express');var app = express()app.get('/', function(req, res){ var deviceAgent = req.headers["user-agent"].toLowerCase(); var agentID = deviceAgent.match(/(iphone|ipod|ipad...
阅读全文
摘要:1、app.js 2、client.js 3、分别启动app.js 和 client.js 4、在网站出入locahost:8888
阅读全文
摘要:1、目录结构 生成二维码 views index.html app.js 2、app.js
阅读全文
摘要:mongoose.connect('mongodb://root:adminpwd@127:0:0:1:27017/db?authSource=admin')
阅读全文
摘要:var express = require('express')var app = express();var Client = require('node-rest-client').Client; var client = new Client();app.get('/', function(req, res){ //模板为 欢迎注册易比得采购平台您的验证码为@@@@请在五分钟内完...
阅读全文
摘要:app.js app1.js nodejs模块nodemailer基本使用-邮件发送(支持附件) 标签: nodejs发送邮件nodemailer发送附件node.js 2016-07-11 10:00 7065人阅读 评论(3) 收藏 举报 分类: nodejs(50) 版权声明:本文为 zzww
阅读全文
摘要:var UUID = require('uuid');/** * 生成激活码 * UUID.v1 基于时间戳生成(time based) * UUID.v4 随机生成(random), 有一定几率重复 */ //var ActiCode = UUID.v1();// Generate a v1 UUID (time-based)const uuidV1 = require('uuid/v...
阅读全文
摘要:const chalk = require('chalk');console.log(chalk.red('hello world'))
阅读全文
摘要:node 自带日志morgan详解 1、app.js 2、app1.js 3、app2.js 4、app3.js Node 进阶:express 默认日志组件 morgan 从入门使用到源码剖析 本文摘录自个人总结《Nodejs学习笔记》,更多章节及更新,请访问 github主页地址。欢迎加群交流,
阅读全文
摘要:var ccap = require('ccap')();//验证码//获取验证码exports.userCode = function(req, res){ if(res.url == '/favicon.ico')return res.end('');//Intercept request favicon.ico var ary = ccap.get(); var ...
阅读全文

浙公网安备 33010602011771号