博客
这里发布本站的最近动态
express 分页展示数据的逻辑
   2 分钟阅读
场景 :Express pgsql PG 数据库的封装 封装为模块方便使用 文件名为 PG.js , 代码如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
express 博客项目的逻辑
   8 分钟阅读
文件结构如下 app.js mongoose 做表结构和表模型 api.js main.js admin.js app.js 文件如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
Express 配置应用模板来渲染 HTML
   2 分钟阅读
Express 渲染 HTML 的,现在前后端分离的项目比较多,很少会用 一 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 //加载模板处理模块 var swig = require('swig'); //定义当前应用所使用的模板引
express+mongoed 接口 API 的设计逻辑
   1 分钟阅读
1、定义表结构(/schemas/user.js) 1 2 3 4 5 6 7 8 9 10 11 12 var mongoose = require('mongoose'); var Schema = mongoose.Schema; //表结构 var userSchema = new Schema({ username:String, password:String, isAdmin:{ type :Boolean, default:false } }); module.exports = userSchema; 2、定义
git clone 的时候报错 Connection to bitbucket.org closed by remote host.KiBs
   1 分钟阅读
git clone 的时候遇到的报错; Connection to bitbucket.org closed by remote host.KiB/s 搜所了下, 尝试解决办法:git config –global http.postBuffer 1048576000 参考资源; http://www.cnblogs.com/Aimeast/p/3515560.html http://www.jianshu.com/p/ae1eb021fd20 http://blog.csdn.net/tallercc/article/details/53870171 https://stackoverflow.com/questions/6842687/the-remote-end-hung-up-unexpectedly-while-git-cloning
git ignore 的文件配置格式
   2 分钟阅读
忽略文件: 如果自己的一些文件不想提交,就可以忽略; .gitignore 的文件 一般我们总会有些文件无需纳入 Git 的管理,也不希望它们总出现在未跟踪文件列表。 通常都是
git 基础用法
   1 分钟阅读
git 配置 1、全局配置 用户名配置: git config –global user.name “Your Name Here” 邮箱配置: git config –global user.email "your_email@youremail.com" 查看配置: git config –list 2、产生 rsa 密
Git 大文件更改推送错误
   1 分钟阅读
遇到一个错误,信息如下; Enumerating objects: 4097, done. Counting objects: 100% (4097/4097), done. Delta compression using up to 4 threads Compressing objects: 100% (764/764), done. client_loop: send disconnect: Connection reset by peer/s fatal: the remote end hung up unexpectedly | 42.00 KiB/s fatal: sha1 file '<stdout>' write error: Broken pipe fatal: the remote end hung up unexpectedly 原因: Git 中
Git 常见命令
   2 分钟阅读
git 配置 git config –global user.name zhubangbang git config –global user.email www@zhubangbang.com 产生密钥对 ssh–keygen.exe -t rsa 一路回车会在下面产生密钥对; 此时,你的 C:\Users\admin.ssh 这个路径