摘要: 阅读全文
posted @ 2020-06-11 18:10 EricBlog 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 虚拟访问目录 阅读全文
posted @ 2020-06-11 17:59 EricBlog 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-11 17:56 EricBlog 阅读(125) 评论(0) 推荐(0) 编辑
摘要: // 引入框架 const express = require('express'); // 创建网站服务器 const app = express(); app.get('/request', (req, res, next) => { req.name = '张三'; next(); }) ap 阅读全文
posted @ 2020-06-11 16:05 EricBlog 阅读(207) 评论(0) 推荐(0) 编辑
摘要: // 引入框架 const express = require('express'); // 创建网站服务器 const app = express(); app.get('/', (req, res) => { // send() 1 会检测响应内容的类型 2 会自动设置HTTP状态码 3 会自动 阅读全文
posted @ 2020-06-11 15:59 EricBlog 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 生成package.json 文件 // 引入 router模块 const getRouter = require('router'); // 获取路由对象 const router = getRouter(); 安装日期处理时间 插件 // 引入处理日期的第三方模块 const dateform 阅读全文
posted @ 2020-06-11 15:35 EricBlog 阅读(245) 评论(0) 推荐(0) 编辑
摘要: const template = require('art-template'); const path = require('path'); // template 方法是用来拼接字符串的 // 1. 模板路径 绝对路径 // 2. 要在模板中显示的数据 对象类型 // 返回拼接的字符串 cons 阅读全文
posted @ 2020-06-11 13:37 EricBlog 阅读(173) 评论(0) 推荐(0) 编辑
摘要: const http = require('http'); // 连接数据库 const mongoose = require('mongoose'); const url = require('url'); const querystring = require('querystring'); / 阅读全文
posted @ 2020-06-11 11:45 EricBlog 阅读(218) 评论(0) 推荐(0) 编辑