var express = require("express");
var router = express(); router.get('/', function (req, res) {
res.render('articles', {titles: '文章页', content: '这是文章页的内容,method==' + req.method});
})
.post('/', function (req, res) {
res.json({msg: "添加文章成功"})
})
.put('/', function (req, res) {
if (req.body.id) {
res.json({msg: "文章修改成功"})
}
}); module.exports = router;

最新文章

  1. Java 进阶 hello world! - 中级程序员之路
  2. Lua 与 Redis
  3. iOS 阶段学习第23天笔记(XML数据格式介绍)
  4. Python统计百分比及排序
  5. UVa 10055 - Hashmat the Brave Warrior
  6. textView字体颜色根据不同状态显示不同颜色
  7. tachyon 编译
  8. ZOJ 2563 Long Dominoes(状压DP)
  9. 按照行拆分textarea
  10. 安装ArchLinux的参考分区方案
  11. There is no result type defined for type 'json' mapped with name 'success'. Did you mean 'json'?
  12. 一口一口吃掉Hibernate(八)——Hibernate中inverse的用法
  13. Swiftly语言学习1
  14. 寻找与疾病相关的SNP位点——R语言从SNPedia批量提取搜索数据
  15. [原创] IAR7.10安装注册教程
  16. SqlServer和Oracle中一些常用的sql语句4 局部/全局变量
  17. 适配器模式 adapter 结构型 设计模式(九)
  18. Linux 匿名页的反向映射
  19. AngularJS 作用域(Scope)
  20. python 学习第四天

热门文章

  1. 【中国剩余定理】【容斥原理】【快速乘法】【数论】HDU 5768 Lucky7
  2. 【贪心】XMU 1061 Ckp的约会
  3. ISNULL-sqlserver语句
  4. LeetCode——Two Sum
  5. HDU_1429——胜利大逃亡续,十位二进制状态压缩,状态判重
  6. migration vmware vms to openstack kvm 修改vmware windows scsi to ide
  7. uploadify在struts2下的使用
  8. 港股street和nominee区别
  9. Kernel 4.9的BBR拥塞控制算法。
  10. CodeForces 146E - Lucky Subsequence DP+扩展欧几里德求逆元