【发布时间】:2014-05-14 04:08:40
【问题描述】:
拥有这个简单的快递应用示例:
var express = require('express')
var app = express()
app.use(express.static(__dirname+'/public'))
app.get('/', function(request,response) {
response.send("This wont matter if we got an index.hml after all")
})
app.listen(2311, function() {
console.log("app escuchando en Maricela DDMM")
})
在/public,我收到了一个index.html。
当我摆脱这样的 html 时,send() 方法中的字符串将在浏览器中发送、接收和呈现。
response.send() 字符串讨论 HTTP 响应实际上发生什么,因为 HTML 是在浏览器上发送和呈现的?
【问题讨论】:
标签: javascript node.js http express url-routing