express源码(3)
来源:互联网 发布:淘宝产品营销方案 编辑:程序博客网 时间:2024/06/06 18:44
//express.jsvar Application = require("./application");function createApplication(){ var app = new Application(); return app;}exports = module.exports = createApplication;//index.js/* 这里是我们的业务模块*/var express = require("./app");var app = new express();app.use("/",function(req,res){ res.writeHead(200,{"Content-type":"text/plain"});//mime.json文件 res.end("Hello my homepage~!");});app.use("/dnedu",function(req,res){ res.writeHead(200,{"Content-type":"text/plain"});//mime.json文件 res.end("Hello,welcome to dnedu~!");});app.listen(3000);//app.js//var express = require("./lib/express");exports = module.exports = require("./lib/express");//可以不用变量保存直接等于require引入的对象
阅读全文
0 0
- express源码(3)
- express源码(1)
- node平台express框架源码分析-3
- express源码阅读
- express源码解析
- nodejs的express源码阅读
- 解读express 4.x源码
- vue+express:搭建个人博客(3)
- express入门(3)-静态文件
- UiAutomator系列——Appium Server 源码分析之启动运行Express http服务器(010)
- node.js实现即时聊天室,使用模块(express+socket.io),附源码
- Detours Express源码(微软API HOOK库)
- Detours Express源码(微软API HOOK库)
- node平台express框架源码分析-1
- Detours Express源码(微软API HOOK库)
- node平台express框架源码分析-2
- express框架layer.js源码解析
- express框架route.js源码解析
- 1047. 编程团体赛(20)
- Vue.js初体验
- 第一章 习题
- vba基础打卡5
- vue+jquery+lodash 实现的滑动时顶部悬浮固定
- express源码(3)
- 8个java 网络编程框架介绍
- 指针
- 编译器错误消息: CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ro
- nginx: [error] OpenEvent("Global\ngx_reload_52660)failed (5:access is denied)
- 三种常用的MySQL建表语句
- JDBC事务和JTA (XA)事务区别
- IdentityHashMap源码详解
- Windows下配置Notepad++构建Gcc编译环境