摘要:
什么是FastClick? 1> FastClick 是一个简单易用的库,它消除了移动端浏览器上的物理点击和触发一个 click 事件之间 的 300ms 的延迟 ; 2> 目的就是在不干扰你目前的逻辑的同时,让你的应用感觉不到延迟,反应更加灵敏; 3> 实现原理: 在检测到touchend事件的时 阅读全文
摘要:
一、安装依赖 npm i -D postcss-loader npm install autoprefixer -D 二、webpack.config.js文件夹下添加 三、新建一个 .browserslistrc 文件 defaults,not ie < 11,last 2 versions,> 阅读全文
摘要:
// 引入mongoose第三方模块 用来操作数据库 const mongoose = require('mongoose'); // 数据库连接 mongoose.connect('mongodb://localhost/playground', { useNewUrlParser: true}) 阅读全文
摘要:
1 // 引入mongoose第三方模块 用来操作数据库 2 const mongoose = require('mongoose'); 3 // 数据库连接 4 mongoose.connect('mongodb://localhost/playground', { useUnifiedTopol 阅读全文
摘要:
导入json数据到数据库 mongoimport -d playground -c user --file ./user.json 如果导入不成功 ,在电脑环境变量PATH添加MongoDB的路径。 1 // 引入mongoose第三方模块 用来操作数据库 2 const mongoose = re 阅读全文
摘要:
1 const http = require('http'); 2 const url = require('url'); 3 const path = require('path'); 4 const fs = require('fs'); 5 const mime=require('mime') 阅读全文
摘要:
1 //用于创建网站服务器的模块 2 const http = require('http'); 3 //app对象就是网站服务器对象 4 const app = http.createServer(); 5 // node内置对象 用于处理URL地址 6 const url = require(' 阅读全文