应用
app
对象通常表示 Express 应用程序。通过调用 Express 模块导出的顶级 express()
函数来创建它:
const express = require('express')
const app = express()
app.get('/', (req, res) => {
res.send('hello world')
})
app.listen(3000)
app
对象具有用于
- 路由 HTTP 请求; 例如,参见 app.METHOD 和 app.param。
- 配置中间件; 见 app.route。
- 渲染 HTML 视图; 见 app.render。
- 注册模板引擎; 见 app.engine。
它还具有影响应用程序行为方式的设置(属性);有关详细信息,请参阅 应用程序设置。
app.locals
J6HpFkYBqix5B4DaVNqSnSzpV3ExyhcCN3cb061pz83mDxhoMvmWSnERILkSYwfh7tGOuMU7OG25kZ+XG4MfmGoNjGaPi0fS0z5JlxGeWp4uG3jt0NHZCnLniBfHybExDdz37JcRqO/tuPw5WDhthMzRcp+6wrsw4M+9HaMKjShE+uQ+M2cEv9UonIm/imyAwAjxsmfF7JYM6sHj3E77ACyOu81LSNHNUwIICpOm/P9cUzqO/qVSbygcz5J2SBdc
console.dir(app.locals.title)
// => 'My App'
console.dir(app.locals.email)
// => 'me@myapp.com'
Ax9qS+YcSLuyjM/Q4p6zaoA4CPk0r/uUmWDRWNnnVmavZA6G6fvy5xzv7s3MVUgOGydA3FROYFBjX3gBZYlTkkgD5oNGcFCjcggp7qbrwfKyL/ixX2sJmPloZ63o+DgxyttGDrHqE/y15jYRQlzvinOeAdXLsmANyBjJSzEDbpGv15twtQRFF5RSxG9I2qtWdaCXb2zi7iKxaMTxMIObbygBnwwCLYNwJZZSJFxe9E4sAtiUjxdGqVO1sitgnFO38zbcwjiCb+LWgoNFbst9Gz/PlLWp9WHpwXc5jfJ7piE=
oSAOFjmSCBvF4NTvNMtl+sYPRaGEyfnhAgLn2I8eKQzqiGLAQNao+yI4xSbqqMyMCRztI1I5ZDBBuihxUEjthhx8WH8DcU2Yj5JdNSYaXcZ8WYkPdV2ln5v1ipfbYDlnCtw0M/N81oRZvdwIAsA633gnrSXSzjBQE/tUc8pvQVjvsJGSGQvGPcafdTEiRUiINifXm3WQq28vAl1Y1eRO9E9da8hjSehKAiQ2E3CHmP0duOWd9LchYQc8A5P93Bq1WKHtFAziqiZnVOEnd2D1biRma9jI8i+bsWDdSRPNIs9Xa/ujv5yI/C2qHFVahKDwZl/QFwQRx65FqzBOQzy5f/oi+W6TwFDzQbX8D1uucRq6u6bw63b9VQi2URpMh2gB
app.locals.title = 'My App'
app.locals.strftime = require('strftime')
app.locals.email = 'me@myapp.com'
app.mountpath
mbU3rdZazWPbgRtQ3DW6GCsVZ8FAHtvXIZqRHqkFd/ZgVU5vwG2pA4+pBX/rWg+xsw0o4N07z/5CfxjEKjV2pH7cxOhi+MoK/tVvV7HQ0STcETn0QnsObe8ecY3khakU
vgu4DNFYE7SkHREZE1eh9WW/bQtyS2i33lIDFI6dhHL5QeCREY9u4tPDpRHK4ZHMi5gr+gCClUmZ29P5QoOV0x7+RpBAHb4LgbGYaIkpn57qF+ClIA9d1+Xj/iGpcYyh
const express = require('express')
const app = express() // the main app
const admin = express() // the sub app
admin.get('/', (req, res) => {
console.log(admin.mountpath) // /admin
res.send('Admin Homepage')
})
app.use('/admin', admin) // mount the sub app
2vSHb0irvt8NZ077+7zbpciK6WR5MkHehDuyDbMdR6jvarfpwgkTC/XSVHOvmFclNghIiGPHsZGXHn0nTtnWGTT730z0vHERWH9jAXFlPhBnWKNSNx+HdPl0cw9xIGY+n8XHdeLqfsMsTJShcX6z0KnHmibVjZdpooNOPrVDqYALoMyd+3tf4bqxTxlwt6AHkqKconAp/2nPiuU4CBttmOVwwT647XkB1vz+Ch1EZobHwiC7tVSqK8KI2y9TzoDRcAYXBmFAi8mApYC+oKmtjQ==
FqooxexjcHvAIMrcmPdmoagzqUu91hbgGnQshUyx/gnTwXcYiVNKo4LwKeoSGABwqY7FsacbztrhBvwosxxzEkdT6ww7CMNIQG2REJ9cRdJgYuxyd3zzWVyIhHbgz2fMf/43K1wfDqppaN6p7Z3WB5/1JOj8oqAUQnsOivjUnfs=
const admin = express()
admin.get('/', (req, res) => {
console.log(admin.mountpath) // [ '/adm*n', '/manager' ]
res.send('Admin Homepage')
})
const secret = express()
secret.get('/', (req, res) => {
console.log(secret.mountpath) // /secr*t
res.send('Admin Secret')
})
admin.use('/secr*t', secret) // load the 'secret' router on '/secr*t', on the 'admin' sub app
app.use(['/adm*n', '/manager'], admin) // load the 'admin' router on '/adm*n' and '/manager', on the parent app
app.router
fn6Xt0LXr3Q3UV59a81Opg1pp7lVIVNPQjwu2ob1PqmQiYo2RWcasqLg9KRbVx4A7UZWv0XoZ7kRuYMlFiuDrNf7AgS18ACpiLSkpQLXYXW0e7lga3npUc75jBJtJoSr
const express = require('express')
const app = express()
const router = app.router
router.get('/', (req, res) => {
res.send('hello world')
})
app.listen(3000)
ux2HQQjYM5T0SyeinvXjLlPBRqhtQ9iwXzQ8aHW7lHmSN6zwR3KcFiJDT5awEAY2IYqzexTJtCrMru3qY5JBvomYb+UaTFnmcaWeCIXXrQwZYGe9epPcO886MVUsDMnX
Y9pN1fI8Fb4bWt531dL/PgZ63imaIh80jl5gbkv3vW53WCSt2TvpuYF4KwNn2hPr3DKT8CRxfCrsjRkLVJexoFZpeFM3OsFVVxuLfuAJTNj6IWl15F0OIoB4U9dL8pdh
app.on('mount', callback(parent))
egYCNdFJcrVtap1YgcrkFA/Bar1KIrqa8at1IzVumi8no6If9zxkgO45yXQOW4Si3Idu47Xep1MfMj3JIWyzA54j4NWoqWO5uzOSrGIleGtDXmwC8uopz2/BUFAhNYjdpvzBLqc96K1p1m+AZS2FpUz16H20Qu/J1pRIV+Wi1uvv+NuOBheujaOQpX8am1lq
owvtOvcIMpE42D8lmAv3CxUMRe2dAb1N1KgucsiOQ7k=
Uz2gO0mZiDlSnpcgeRSX+MWF7O1qkSzVg8secSFh92g=
yOAMIBK+3ecSUMtLx5BXAyFSMXbyEI6X0PhgOmCDvBMyg2zFsSLHMK/laWxJ1QD0U5sd5bIXfV10jDIym23P7vCJrSeJ7EnIXQtF7RWzDlefxpfb/1G5Ccl1jTO79vLD9sv0OLNsvFFG/hpVqbQvLCy3vlMxETjL8+6G5fenxu7AbTqjf2fqU30MiEOZmY/NAg+LYgyBJqq2wo+AH8mK8w==
HGysLvaNERv/66Kc2aEngMoPCCUmx94veo/8pc4nJEmKfonbjF8gPHZf6hf52cxg+lI9qzdCewPl0wfUvQ/FOi/1JwI7k03W1rJe/A1fIS8=
const admin = express()
admin.on('mount', (parent) => {
console.log('Admin Mounted')
console.log(parent) // refers to the parent app
})
admin.get('/', (req, res) => {
res.send('Admin Homepage')
})
app.use('/admin', admin)
app.all(path, callback [, callback ...])
+/XXiY1DYzvsias3B//MJZhByI5uCkjrwqTGZ+rqgyWNAXkj3NiYkEVkrIZJ7VtF33ibr9OVnLKE5/y1GP9CJ0etrtleJfttRPJLwAywij3c68mFIs0GnF3vMUOpgkQnaHjUMjA4ho7yIoUNMXojtjCt5hFxk6jC/wiT7mGzGfQOCLq7SxPE4p5EMX6bS9qiNL1cNaTaNWW6PoECLlQ+Tw==
参数
参数 | 描述 | 默认 |
---|---|---|
6wjdVYsEjSa8IGuw042kzuKypTaxXUt7hgt6Zpq2zdI= | +t99wXKqoA6rP45dm7o/WNsh88aFzzWkOp0NaQNWv22V/0oI9cmwuv1CqCDpOTCNpuklYGFjI4wtwPQChA/4Ew==
nmISikPIeKFk+B/psi+9xdlYDbSAkCQGbONsy9Y/IniumJBWiibI/epwxxurP5fTQtQx4DLqCOxhc8FmzbLhzbhocL7XaflvbChCbhOpNZDEwN3x8+o67WMmQCkYbE2R | 0HoW4ou6G5Zm1xqrFgWuLTj1Y9e6jc4+LU7qrg3fF5s= |
SJjP3FVBAp/5qgyN+uBoErKxvix5hBT0FSs13dl621Q= | 01SjbF6hoeZh5npOrJScYUc+CUOTpE5q4w2C4HkZ0pA=
qi6u0anog8Yl/IdZdO4HlrtM8sfGoxIpXuJCv9QQxMcY2KMPexwj7/+xBuPW8n5tGmKAt/0e+JkD+DjyGTalI/593sZjtC+FDp9KiB3Z/reUxR7wYWWEjJjO80RbrOD4nleOsEM4zSqz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g
app.all('/secret', (req, res, next) => {
console.log('Accessing the secret section ...')
next() // pass control to the next handler
})
oS2vSgHvWrGmsucoyjOIo8qIH9wwKpxiB5GkYnhjkuezEe8rJyDdeBi0GPYta65OuH7Zrp/fwnuQzc9vGDcE8SQ+GIZyb61KzdY2z2ARgqTJQcspaI+zicAx+n00vEqtFKtyg5FJDGz/5qyKNLQMqZQ+BuyuVF5NG8SOKXkrYcP3APxXs4qjVJMLR3TjRhRi2TD8c0mfOqd9661gAY9bifcQSux0oi8TOru1c9M60mk65lghuJ4Iw9DwKDNfOg3UvK2rUXep6Gm+mDtlLtEfA+V5F8PRH2ELPbAFG30euv/wiNZeFjzWYk0SH9zR1GzBZtMVqzZzRQLNiAZxmWE+imt+sKHAh6MlA8JYyUpa+0tc7sAf+p8O2ZVXPLov4H6S7A4C+c/mGZTGUlLMq3xq8y2j6hDIGfGA3MaSMv3BbsSs1Ix0KmwHTrRbsiD+i0fpd7doDUbHHK3aetKI17JmFnSjk4awnr3s/r+4wIxXZhnOjUtYRU4uO2PuBoxqhCDE1eUupz2H8oSdGRetUDcAN2o2/7IuhF7oWeuy3Eg7tjmH8ymsGXVJh1S5Rmyt5lTq
app.all('*', requireAuthentication, loadUser)
d0hsFNMSPXVcbIB9fIEvKQ==
app.all('*', requireAuthentication)
app.all('*', loadUser)
p2faVbZBSz5b4Z1O0LdqiWftZEF2Nu45zkCXAHsdjuFYWSS65ccNeRNAo2Lv3PRVwp2JkoCD629Mo6M2MHIp6ct3kbUlDUnbL7fIKplpS3Z40YVNBIVUQz3mmle2jd2CljjqeB1FUl4vgSTPuxC55KRf/Gvrox4RMVtf4vypo1qguufOHflAqk6oPZBUqRgG
app.all('/api/*', requireAuthentication)
app.delete(path, callback [, callback ...])
vSIu/DkCDRub1r1pMnzUskRTch/D7Kiy6Jje4Er232l8bjvggWvCxkUq8SrzfcZNf3/9X4jhBcqjbmjXVMKq/1JpXutyR3aqFU8tpQOPKj1l611S+65SBV7QH2g19TdybjFVq3EY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xCmf9lhRC+7E6MmQ== u9V5WTTiyuyZGMS/0XFX0EB+oJKyIbIrhqFodwS9z3Bnp0dPj0qhCKh/UUx4XZaXEDDpyC2/TnNQpVKjWl6a9ABltIhWdk1VznU1mSHmUGVVjEQUo3znAL1oABcTS2ut81k3u3QlxYUM91AKq7KDNbo5MPh6t30lxw/UDVxaqnmMEy9TFQ5qkHMZiMI1FeSvzlh2i8z5cp42x14yXTULUPzgflwdLbgDd7p4PVyUfXpzAHVQPIC79dpPJhM0B8B6UeRcGLhes3Ew6sMvMM9aIxjgymUOcIYTjCUIv8Upofg= nmISikPIeKFk+B/psi+9xXjvCyMB6oUQeTvjdveY/oeqf7CtZQlcC2gEfQuc0fpvRaz+riRkCCcu1uRCb4CAm0hMDlNmyzqySZ+GqoEa9OENDHG0arcAm9QJ/EUTUvQi | lpdtS1LXTbH/7HDRpyIOJw== |
示例
app.delete('/', (req, res) => {
res.send('DELETE request to homepage')
})
app.disable(name)
zhkDw2wOow+M1Sg/VAAUkL7sbDCPpkDx4yMAnhIH2p3fT3+pzObPZyNB3O/594JzFDd0kndwUTt/n8+Yl16Jqz3pb0Y7bBgk+CNPRvHO8NLkQo2yeQm64p2KPx5aozUJdqPwZExI30IaZ9tY7E3dXuuOspi4yJem35PS4f0j4RX2jqJ/HZnTE7cehUSdGMjFoBS+cHSVfyv6WpGRl35AbL1SSmuMAeJYvxvH/IqzE2NByOe18hpgeXt59Q9JfTZGLJMu1QYxQNwrZNAsk0Wl1DJ8z/+WCCVcKgyDbPD9/JYMuXfHzAcPc7WrHi71y1kOBTxeZqw+/0Hd7CoriFgWSSKkDYHj4MpIjpoNlD6CDrf5wYOvB5jqzpBVUAgMHRLB
4h5+3DAGYIrQZh8xCRRFCA==
app.disable('trust proxy')
app.get('trust proxy')
// => false
app.disabled(name)
j56FW4ADeNxiwMq/VQnvn4Ev9pFEAFLi/Slf9hjRKP1Y3hD8CNJTF58p0YZkHPrVxkgFC9IY8wX3z46hPE/1w7H/m6aOEwg75/vAiq39q+BDKfXTzBh7wrr6Z2o+wOJYig+gfogwyZEULeY3/r7tfxab+gIN+/aA/wJN8g/nvuMT6QsZ9JdWsgDtuwheHMh3f1FSjuM/24hM0Ovprkq4uzCVvw+N4xLTaxwRE5Zznz/Wk8lE7h0Xp3R2LhnA+/tqWLx76TjkwkY4inSwB3V451THGSuWFnOFSPFBL4OcS/8=
app.disabled('trust proxy')
// => true
app.enable('trust proxy')
app.disabled('trust proxy')
// => false
app.enable(name)
zhkDw2wOow+M1Sg/VAAUkL7sbDCPpkDx4yMAnhIH2p3fT3+pzObPZyNB3O/594JzJmYmk8kVvOTA1j6oRc1dL2O6sv8R55YYVp+EDOfpiire8GTmV5wwbHHO1hOucMc2021catE87SUlIMai4amxk8mJbMffI/xkfy7rosxe9e25SMF1NnJ3f25vSC1RwYUcA2XD/KfrOm9k+0MA7ATXM8TlqjjejJfinTTMjTzn6jumvhV8ie0uR60+dSKM0aNJ9c6iLBXKjPD/i1bcc6AdAt+lyXpnkJa2NHSgvQCmx47p41oOYg0qIN28SFB5ZYYmLwZwncVYPcRZHYiFiqw7cuZkGgwtR98B7X6PdzVDhf6H7N5EpX35X7pkE5OWQFQ+
app.enable('trust proxy')
app.get('trust proxy')
// => true
app.enabled(name)
G/o8nDPUmvLurNgCLkfwbciR46wmSNVpg+99yf8bOhCBC8corNifU9vzxTULFdLp0LTYOAVEH0dJcira29bx7gv/YzbCKPOjSw2bwXr9JqMs4wNOXwu+X9yIyfnIgI0Ypyh3f+bnMKEbDEAxzcHFSXWd0oFUcI1OpIUw4rREIBJCb+iAbH7d1YxZdw72vncNLulVMkpw49bzYT0I9VoN9fCFkjLdyyy/CrYZr2qu/32Rq/jVryV8Ujuh8B5FQuOgOSoNhUy4mAOuLzkHtpgcbA==
app.enabled('trust proxy')
// => false
app.enable('trust proxy')
app.enabled('trust proxy')
// => true
app.engine(ext, callback)
5Rhmw06gtPT8ZNX0UxEz6DcMT20lY6YKSnzXhkFj8hlu/rP+2yovUOH6xDWSxhXvrIYmSBkqzPwfq0u6neWlLuycdcsqTiRxsh8faYdoado=
DYLORq6DO0eCCJJX1ne2KEeIaz0eDR1byRK5RPrpA/MF3CIEMtkJAOY+E7BGuM58IWHQ/AyJScHtat+pdf+VHB8leXFdB2lB0henhYdHXALlIQ8mbKX5TEQ9MAmgp/tncWBW/7VaES9snw9Tg18wuGeyIxme5HaEQThtvYBcnn4QNirPzr8/o+yHsyj5AIjz+5WWfeuKgyGbRcPypffrfbNuj4atLMleI2WeSK+7THifiXflB/JmZkAJ9CLQ90vdg5VPiw5xvtaX/JLeArpuzw8ZyWLcHWZvgAKOx9bullixct30tWfxiPOQFp60zFKyobGUULKOh/itdDVXCcUGNA==
app.engine('pug', require('pug').__express)
qOGZ/LotvNMs9j2fh1uzhheEFbklz0r6fJ3tZzs0+5qHgxrNELNRUbHLg7Ohjrjc0KbQuZf9vyxKP4jVFO+gnLzCw6RSR9GFT7H0cM1hhvHRgTS4hPAeVCJwSU0/aXvAwQ9kx1/HSDwclchhgeV5cDtrdThrUgHtH3hP86oqcfrwIDOS+qHOy42fBmU3ncqZ1JyrdKqF5wDo9xJ+tHS6zQ==
8SBjIFTbw4jXo5ErbvDqSEjus8BiHQv/6P0g4hgJngz/cWSTBGVuC6nex3niAcuw0EDcay92Xw6UjxagJWRkGw==
app.engine('html', require('ejs').renderFile)
LUhHP9K26A8TlUhi98SRprTyY/HLKei8hgYyt6zp7ADvZM0Mo60E6hJ+4bOgNg4jcTf7ad6H3K96K4m5RIhTK0hCGkVTfPLBgQuG9jP+HPh0f32gJhuGCO5u5h1x6IZJy6DmOFqI00l5knjvrCUY1adXbo+5mbuI++iCoUtN9AupDaDjK3Rcp9QH8egLUvj0WS3TFif1BtjLoTOcLIybyEcIcgzHdytt6y314WBq9WmJEgfJoomKVp6+O51hdpxK6aZZjlExtOB5ZsAHkcJJf1jXWRcd6R1NoBrCzVnuHSt7qbx6A1yizAapep0Ip0aCEb4MuRyXSmtTIdqfZj9q4FPneN4ET0q9asuKMlsN1cqPUn4faoqOxIOBAP1mo1oEYKE0OD8w3+zWKIbh+XR2Bw==
XM1Czn8e5rZu7mj0tp4LbHriXBSzyYINYK3o4hxNYdo9YmjTujjVoMf4IjM6A53Xq1MWNaCemKFjQGgzskyEVtR0A6UQtMu5E0egw3n28HsRcmAw8jftTNrRaFwCsPEaUUdNdNcmIxbPyPaQuips0WeoKb9YATMNAA/vfUjcCszs+3CGt0ZY1nJj9Zctq29BSeOQtrSojO7HTp3MQT+LULaWj+ZiVYwLdsPQlFXH5eKTFkFHGRh0d3muX0RdRpfnQHTJrEoewH5viki2AnDklA==
const engines = require('consolidate')
app.engine('haml', engines.haml)
app.engine('html', engines.hogan)
app.get(name)
MUuwgVoUWLwE4Chx9B1Vj9pf2q3r+7CW2hSKshRIDoE+RVgY8dimxoSx6Pw4P2e0AgFCA4IecNdW9OwGHhbm0SDMtqMXQ9flFGma4O0ImR6hqW/gnT/kMTKY7NrLC/5Piwa2KMQk/8jvulCs8p7YQv9OPHTaZLOO0WvL+4Rb7qtOdorjC7t9I7oQv1WsfrHSsKs7X1BNgOL9ovbGrEQDTdqJTDH7BbF0YlGIeKZSwkc=
app.get('title')
// => undefined
app.set('title', 'My Site')
app.get('title')
// => "My Site"
app.get(path, callback [, callback ...])
vSIu/DkCDRub1r1pMnzUskRTch/D7Kiy6Jje4Er232kVZDix1YVTP86KDz5XjFD8MV9JTyMVN/T2hHzmsEt1jHyw/gSbCZbSwkp5uJSHmUk=
参数
参数 | 描述 | 默认 |
---|---|---|
6wjdVYsEjSa8IGuw042kzuKypTaxXUt7hgt6Zpq2zdI= | +t99wXKqoA6rP45dm7o/WNsh88aFzzWkOp0NaQNWv22V/0oI9cmwuv1CqCDpOTCNpuklYGFjI4wtwPQChA/4Ew==
nmISikPIeKFk+B/psi+9xdlYDbSAkCQGbONsy9Y/IniumJBWiibI/epwxxurP5fTQtQx4DLqCOxhc8FmzbLhzbhocL7XaflvbChCbhOpNZDEwN3x8+o67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c0fpvRaz+riRkCCcu1uRCb4CAm0hMDlNmyzqySZ+GqoEa9OENDHG0arcAm9QJ/EUTUvQi | lpdtS1LXTbH/7HDRpyIOJw== |
Y9pN1fI8Fb4bWt531dL/PgZ63imaIh80jl5gbkv3vW4DoQ+UQcb6OiqlnJGNKVU6uJxjs0DNW5x4rByXoKak/pO+8ZUxP2ZvKuH0+9p/cexKAo+IPV7cY+QBuDLkkSOl
示例
app.get('/', (req, res) => {
res.send('GET request to homepage')
})
app.listen(path, [callback])
Hvc0HnboFwrFSgvIaXdJViOMXFsqr/fTa/ZCZdqmHmq80gw8uopyAqljEl3OoGLhup9pawozMz5NEvfCQ3nFg4sMOlM8ZKvLw6cUQl/uypWqPwqYzoxkRIf3AVwD8TqzIpjTsbeTP9Hnelc7wsjuerYIaq96K7D7sPQdgRbJTIJ3YsHEp3DfsfyyGC3Jz5I0TA7JBFR6CKSjlH//RpcYwoYdFitn3S3BNX6kE4AdD2o=
const express = require('express')
const app = express()
app.listen('/tmp/sock')
app.listen([port[, host[, backlog]]][, callback])
HQSUXOx25BIHUjl0sRUUMNK3ls3Tllyi9UutwQj8rPgYu+F+cC2T1HztqvESbscy7PnD4Cqf/nH+z5GFUWpYWmkLg9llg+KqQq0ncwTMJCznOsLXGn+Dxqm3VdqyTB+k+xgzvWUAue4enMp2kIgHyYtSr2Sgi8TD0pqzS83sq8tx72gd9bnCt2oMxKtmeb2/fXCSss/KHb/Jd9C6ThfNFA==
fyeK2i70qW+bFyIho7oJWUyH5zBXhf8MSedLM7/0va6p1ClttmxyUQzNSQtVrEboccm4n2K+ZarEWxZQ2h38XyP+1j0KxtkcEtbBzfKY+T0khilNXKf9lQ6lFzOz1LldpK1d/YpJrzmEXmJMuL3xFEf23YYlQRyrLwNWBI4YS90pwFwe4KT0rps/WGs4/iRudtbkuonryRUSh0nVRT/SHg==
const express = require('express')
const app = express()
app.listen(3000)
ztlF4MHli8EoDrMgYEHRRzTZael56Ot5A9PArj6puiFqX5M9gFScz3ZV8OItwqMYOewCBjKEvWUj6XlgXZI7NgbHepB57VnijerTt0ZUIwZC9SLbTSf34U0+1wQm93YcGrxg1Ji3gsrpHwS/VmzpPrA/5/aB0y/x9W229YK3m6u63NL7xDYrjbTvUS0XMmH1fBbem3fxu6MqSjuTh7iPxV/bHKyP92MzhMlAjlTnL/JcDECsuEw9LeeCEIJkjKziZLqZ9gEjhY7RbzAzEvixhtRA/GqR06qH3mMv5RxW5WfdLuD543XPHwahH5FS+nRdFpNmSk634ncr5MGC5zdspk1N8s1SIx3h89qzh7hB8S8FCUehIiPei7WHL/McOIxFEdrC6/Rf0uMgzd4wRvoJgK+WAJZ5cTIbTnFO2HX/dzLoM+L9FGfHD8DzKbs0u3Ic3R6ayOPwGo1v1mL8pgNjwQ==
const express = require('express')
const https = require('https')
const http = require('http')
const app = express()
http.createServer(app).listen(80)
https.createServer(options, app).listen(443)
LalYx51d959LvkdIdnaxHkUVh+gGatdQbEh4ebD7P4pAGpQix+MjSfu2lBGgaJ17YiR98su6MzHo+KJ7RZBi97H+Sik0P4qybQazgMQ0Q1J3wklFAEkPptD63AAQI57pO9MACoUGvgAklDNDqwXmo/n3sntLTEgtfpKHubxWcWeJVQxk0N4xmuq9eDwsY8XQ2u9gu8JrCkbe4iLGX2O41P1tKBCg7BxmdWfk8y/66LM=
app.listen = function () {
const server = http.createServer(this)
return server.listen.apply(server, arguments)
}
UNUpmwow1g/lqGexKiUoAj6OY5iitQc8Lb99eBmkraiGVscaenj6zC5+MsY+6hcqK7kk4DE2raN7vmeetrv8ukzredVuZHJDEscCQtfMeFmQb/DCBW0liJovqv6QtOJzkodWlT1ZCh1OaNrhfHf6EpvoA3OhZM20SJnqtUASNmsWYyebcjP54m1+Vppwl+wg
app.METHOD(path, callback [, callback ...])
fit31bsL73u2sA3BMi8f+3gmEa6WZcYiF17BAR7levWyUJzoYe9iTUR3hVm4jf61tWS23sEIRuNH3BtFU0r5KKHSKPFePX7XuB72HBU2vR0dmiso5dGrE+RUiap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LPG02GmhTGtU4RloVQEzHlY58cZ5NRx6t6yPjV+OCnP2PXNzqWwl2SFKBpA3gJkYznesTP/14aYPWAZIbUNF1qbt6k42e5zZddd7HybrmdK03Amio+94AdXI4nB9nlHuO5VXZ7AVV1MEKne3ZJ+Hi8GKA6KooyTjLRffJzk6k+Xc
app.param('user', (req, res, next, id) => {
// try to get the user details from the User model and attach it to the request object
User.find(id, (err, user) => {
if (err) {
next(err)
} else if (user) {
req.user = user
next()
} else {
next(new Error('failed to load user'))
}
})
})
z91LcMAsHMnh1rRKs3re/2ICpxLY2CSGzleV63Fcp1GwXmzHumnH226y0O3JZvxiYbjkcnZTHay1JcKyz81GMr5VpFcAxqhukBXJTZgAk0IR9FLpO1dIzLio/ikmvTMv6gceOasl4sjb7IhQbofGBaZsxs5j/xuMB+V5c5qJX0GgDE/EtWI5ti9Grxg+8p2urbCyejiOqG374725xJOyg9FTU9YXe7M6xpFyh4+gclVENE3wGjGjr3C6d+sWX1lpmg+aJws7xGs8koiI9ja6stJvAkeaFyUzcaTv/poiuXmIdUb/jtjCdcsrMKlG6L3v
4QP1ZYjWv5UaV5pnvOhKF8aZhINVL52o7d3rUv0W10C6OQMcoQBBBgjAouoFk2bJAo89uLCs/2Po7N1tLPuw2p1Erbhb1/1gneAvPn5CLqxS2DoDI5uNkB4Qd/kPLzpG4AvZ++YRcesn6jTNgdNP39TSTKgk6F4bc30N91cQDqN2CJj1QcyR9nMbJcYYfI6pJG72BZfncL5ooxiSegumStSwucwRGy1T0Z0wJdXSWQTM5IzFHrEsfkh+owCvmGJu3RoDYcj/vzq8X+YqVvqRwQ==
app.param('id', (req, res, next, id) => {
console.log('CALLED ONLY ONCE')
next()
})
app.get('/user/:id', (req, res, next) => {
console.log('although this matches')
next()
})
app.get('/user/:id', (req, res) => {
console.log('and this matches too')
res.end()
})
7uW6lhRyP0LBQSvJLxhUkGJyAR8+QWGgC8u336fJALyQDrmFq0zeIxvRLT7Ne7XLL6+LzI7Tjlw8h5YqA2t0hw==
CALLED ONLY ONCE
although this matches
and this matches too
app.param(['id', 'page'], (req, res, next, value) => {
console.log('CALLED ONLY ONCE with', value)
next()
})
app.get('/user/:id/:page', (req, res, next) => {
console.log('although this matches')
next()
})
app.get('/user/:id/:page', (req, res) => {
console.log('and this matches too')
res.end()
})
7uW6lhRyP0LBQSvJLxhUkNGNEzthXHb8JG0J5dshF28fcOoo41VPR6Oh9daD8xWvj1EJv/agcUTx7IG5yXVzog==
CALLED ONLY ONCE with 42
CALLED ONLY ONCE with 3
although this matches
and this matches too
app.path()
2qi4qownOfxAhm1uQvrHmOL62GmxInajdF9cDqlfORxfgcbm2TL7Yf/bTKj6Fp1BfR7K19nxKAkBq2FdGUapiA==
const app = express()
const blog = express()
const blogAdmin = express()
app.use('/blog', blog)
blog.use('/admin', blogAdmin)
console.log(app.path()) // ''
console.log(blog.path()) // '/blog'
console.log(blogAdmin.path()) // '/blog/admin'
kuPDUh2b8a2kF8rfAcoTzSNJevKu3PaAUOOnwt3gqWK2WA9lVx+2saXUwrphttw5HQ9jGzlasPw9k+oIzUmfp2hSfj5FCXIL02XkGdsJqbq+kDwZEjxIwFJZvgUEdtO4G+cTnb32VAGdfFEzw6dtfkQeNZChOjRmUK+SqWkAQ7n9jyvNBewG/iN6qYvxvU7+QCNaWHD6CvoUJNcuCUq9SsYrtqyW3rgtGF8eg+Khi3hTq6FafGK9x7S+2nCrULn7eiI4B5nIu/kgz1qzqJOReQ==
app.post(path, callback [, callback ...])
vSIu/DkCDRub1r1pMnzUskRTch/D7Kiy6Jje4Er232mnrzx4w/KI6h47aJpkNBUFEz5c1V+RmUWP2JX3KahqQcfVZTtQ0je693ZjvtbvycLBAQHzBxeUB3Yc0uUGKmBu/aNtTvPx4MCNAnqVQhgYTn7YMOvT9NTm2wzw/KuDGE2azti6GQLzRnJedLl/OVEYCefzkoPDIIZz1FcoNBnhRRksevfAvmxxRf+6coiNV7M=
参数
参数 | 描述 | 默认 |
---|---|---|
6wjdVYsEjSa8I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81k3u3QlxYUM91AKq7KDNbo5MPh6t30lxw/UDVxaqnmMEy9TFQ5qkHMZiMI1FeSvzlh2i8z5cp42x14yXTULUPzgflwdLbgDd7p4PVyUfXpzAHVQPIC79dpPJhM0B8B6UeRcGLhes3Ew6sMvMM9aIxjgymUOcIYTjCUIv8Upofg= nmISikPIeKFk+B/psi+9xXjvCyMB6oUQeTvjdveY/oeqf7CtZQlcC2gEfQuc0fpvRaz+riRkCCcu1uRCb4CAm0hMDlNmyzqySZ+GqoEa9OENDHG0arcAm9QJ/EUTUvQi | lpdtS1LXTbH/7HDRpyIOJw== |
示例
app.post('/', (req, res) => {
res.send('POST request to homepage')
})
app.put(path, callback [, callback ...])
vSIu/DkCDRub1r1pMnzUskRTch/D7Kiy6Jje4Er232mH/sw3UGT1PLc1Z/zpnQAhmEtDgoYr535B4mXClx34Zoc2Jy+Tz77hO7ntwOje8/A=
参数
参数 | 描述 | 默认 |
---|---|---|
6wjdVYsEjSa8IGuw042kzuKypTaxXUt7hgt6Zpq2zdI= | +t99wXKqoA6rP45dm7o/WNsh88aFzzWkOp0NaQNWv22V/0oI9cmwuv1CqCDpOTCNpuklYGFjI4wtwPQChA/4Ew==
nmISikPIeKFk+B/psi+9xdlYDbSAkCQGbONsy9Y/IniumJBWiibI/epwxxurP5fTQtQx4DLqCOxhc8FmzbLhzbhocL7XaflvbChCbhOpNZDEwN3x8+o67WMmQCkYbE2R | 0HoW4ou6G5Zm1xqrFgWuLTj1Y9e6jc4+LU7qrg3fF5s= |
SJjP3FVBAp/5qgyN+uBoErKxvix5hBT0FSs13dl621Q= | 01SjbF6hoeZh5npOrJScYUc+CUOTpE5q4w2C4HkZ0pA=
qi6u0anog8Yl/IdZdO4HlrtM8sfGoxIpXuJCv9QQxMcY2KMPexwj7/+xBuPW8n5tGmKAt/0e+JkD+DjyGTalI/593sZjtC+FDp9KiB3Z/reUxR7wYWWEjJjO80RbrOD4nleOsEM4zSqzsR4bqtSRwqBB/vvbGv0x+bSDPHkFACoszDsunlDq6QzAW7x+yXiiWQuhtNlGyvwxaHGbabAJ0DAV7Zf+gpojYgPiuRP3IYPKEIrmescCmScz4AZvhzKSHvJInLfYgKEqNpO9sl6uNlABTBUeokOTASXwd+y7WfF3qejg8GYMtU3pf3Y7FHt6H8mRyxW0JeCltm+fp9IPFXOe4nnkpEzxsHbIplA8B4NX0NWNrMqyDtqIJP/hYPfmuTlhv8bFLRzaO7S/qGynUw== ETd1kfGDNMGNWzF8PKaglt0HIfAZixQM9zJCAmzDbDvt+EEiVJ1ehysvi1nCdX3iOWCHKQlD1wWzF/jon2v+O8DlK2d6xT+TtZtgs6vvlMeWgrwJcn9j/v3aEdYOWfOI8Khc5RxCmf9lhRC+7E6MmQ== u9V5WTTiyuyZGMS/0XFX0EB+oJKyIbIrhqFodwS9z3Bnp0dPj0qhCKh/UUx4XZaXEDDpyC2/TnNQpVKjWl6a9ABltIhWdk1VznU1mSHmUGVVjEQUo3znAL1oABcTS2ut81k3u3QlxYUM91AKq7KDNbo5MPh6t30lxw/UDVxaqnmMEy9TFQ5qkHMZiMI1FeSvzlh2i8z5cp42x14yXTULUPzgflwdLbgDd7p4PVyUfXpzAHVQPIC79dpPJhM0B8B6UeRcGLhes3Ew6sMvMM9aIxjgymUOcIYTjCUIv8Upofg= nmISikPIeKFk+B/psi+9xXjvCyMB6oUQeTvjdveY/oeqf7CtZQlcC2gEfQuc0fpvRaz+riRkCCcu1uRCb4CAm0hMDlNmyzqySZ+GqoEa9OENDHG0arcAm9QJ/EUTUvQi | lpdtS1LXTbH/7HDRpyIOJw== |
示例
app.put('/', (req, res) => {
res.send('PUT request to homepage')
})
app.render(view, [locals], callback)
SiJp1jrW6q8tF+/Ch6KlQhQZ3IAFBOxZEmjLRWDE8rp2rkrxhubLCkHR5KpwQLg0hOuqirikjUa9UP5AufuxU0NuaBUjQU5YfemHJztJIfUTtSaYLE0Zlo6FSENxWzJH131bmzKuYvA5LV9sXaE5zER5XF7GirRnFjgTTBsUwqcgPNk9ddG5ySIEXPiJzQeSiDwp/jqnXF2Deu1KK6wausfodPUSHyB5xXF5BQc7ZfMejTdSbwNyajq6eEkit6Ul6FshIJ0W/h/cuk7j2s1Bg4LEtDOFQfWLgrUaCGl8ZpZglWoAm47Emnref5c0eMfGVCWrYyP1NU+dGCM510DGrWR8YHMQ3DL5lVRsCpT2kP/Ff3/SqMoEx6KM/vSFVGN/
9W3t8Mcc7YIuwVCI4AG7CvGaf4/k60opMUC2p0ze0jqx0wMcmW/EtMijr1FEEfWGlha2LMx0u0e+0hROElbBWuvJQPvTEblt9GpW0P5hXIFLtZwmzMgB0oeUsjq+e2BXcb+ui6k89t//GUeI71RZBdhWDeO/PO9ZVP1LDBP9HMl5z6kc+tSTFSzuf+7gxR51FA1YufcZvbHLmfTa/Hu0AGHzQeWAydhqAf8I8I7r9UE=
MvTJ25YK37i7y3NdWv5m4N8Hm8q67MfP0399AaCpPMzDsgdu5vKKPFIUkZkYrNd0sTjLhhuAosYG3cNC9dpqiGyLggQG1QPqCJSKQEi1+CFEPfi5AGwHHZti0McYDPhBfimBUQcxBfp5ZOl913E05rO7gTTucDIex6yX8frDyB7eommok/X0iCBNp41mS7sA00TKmvQxFbldgcWJEx1bNrGsLOe4dqMviDMDDBjR0v+SquInVOvFIHE/wGSS2/bl
app.render('email', (err, html) => {
// ...
})
app.render('email', { name: 'Tobi' }, (err, html) => {
// ...
})
app.route(path)
h/Jo+7oez+c0kllCdYoTPXDeSgxvpnaTrq3A0AKX00K8O4pzcC1idcIwn1PYxndROH1p9/JHA+A/s2H8wKldbvFFZmN7mikjRs939z7ShCtoGkHjJJG6aIGnhnnynJVKKgO5WQZ0SOm1c1ib8NoX4UrS8kQNHpzGD7YYQOTUP7459X316B8+E073O5wQM1stbWWUYOnNvHjxFnYdxcIQBPSAGnPLxGUhzBbFhw/bwTdlTt+xvVhoApWo3NrjuFZqn53nUUMs8oW56g5p/5KL+A==
const app = express()
app.route('/events')
.all((req, res, next) => {
// runs for all HTTP verbs first
// think of it as route specific middleware!
})
.get((req, res, next) => {
res.json({})
})
.post((req, res, next) => {
// maybe add a new event...
})
app.set(name, value)
03eyAeQ3C7q2+6T5hdZLUdo93KhCvEBmPiCeyoSW1RDrUwfl7mPVYaiFwyvkLo/Dx9urdzwqP2qncIS88UroJH9/LT1LA8iR9SAlCRy36Iz5dHb/h44+RpUGnvsjtg+UXfQUwHgsxiY1QurPo11uL/lon4mF6FTox17cBTVikNqTY1J5NVq0jBvQMP+4p9SvswGXoCf6K2hGPpZtxFRiodHmdwEYiJ/DneOZICN9JclkneH3oNX7CyvRdBw5btpQ7Gya78/LbPRtddLBmcmu5dtYxyySqzeyaudP+P5M+KsbH3Qr5AcmEosO76dxpt+FgNXPs71cmIRXyuzOuHjpIA==
kzRy0X3TeKj0uZSqyHxq3BJRqwOodHCqqJ7p4antIO6bJLEVG0ewjseC8VHT2TtrvBoYjJRhVf4LYfIObSfJvBAzG7po0i3ePZY1nmSkbdTYBAL/JTboeRSXlmWqOkDMzrxVVzXVgy+Lfx7OJegX40ln1MoUx1g3l/12pvZGdaRKS/pbwFMN+vvr5n4bQaiuSiG+HFC0GoJqggn/tM3/NGXxWx+vWzPVPTFnbSL3jVVcbQV5R0jjORrWrko/3AenyVYBN8YMuocNMv1pxQwmQPdmYUCjyyQyirY8nNNMr3A=
BpDIkXRUnkPiBz8iBceshCHZGElYX9yb/JNRNa5yur7ELAtUWqsJQ9CIhOwZUUt3U3oqlMQCC1Gb6P4UBx96fvIp0TAp3f3gmKvH+HRmoG9M0/aKdjf1Lla4vDjeV8omurU9RskjhM4hDA6eoyQRhg==
app.set('title', 'My Site')
app.get('title') // "My Site"
应用程序设置
cnddn6JuCsPJDzcs3isJJXfb4cwLDqWV1e659kNedSeqZOU/MNrw8b9Kfw96y8wh
9078NL4ukdNczH5amalvB21nDP+T7fg5CJG0irlOfTIuU6FHEx3O9+If6sugvEdH
- yOAMIBK+3ecSUMtLx5BXAyFSMXbyEI6X0PhgOmCDvBMyg2zF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rCgCsTvLayykaKSwO8rb03XWIDYB0V23op/ogx/T+9aEt13508klEEVqBPfcnPaKMM9MgQI87+7GnyH2SyxbBQ/RmImZnifTv906uUn4AJ/yYkt7kKqqE
|
app.use([path,] callback [, callback...])
T+agrlA80z75NfZyO8RcNy/2PsSuy8n6RU59EkqM4SOVMS6mIQuD5ZAcI1d2o7Dt8bA4qUV+xNgS2eAcZjiRV1doJu9dTEWxgjugkt7f3hUpNQxgdd8DGjaWYIcrKPZSp8zhZKN84Uy3qE9Gv5Ed4r/+bul4bZnww1m3/S/VfzQ8WZoavRv7ARy5JU4SrCNSKw+ibafgKDCtqySBBpjJ4iMhFLCj/kSwMTQv0PSJ6Iw4NVPulebDR2tydDCQQzU7
参数
参数 | 描述 | 默认 |
---|---|---|
6wjdVYsEjSa8IGuw042kzuKypTaxXUt7hgt6Zpq2zdI= | +t99wXKqoA6rP45dm7o/WNsh88aFzzWkOp0NaQNWv22V/0oI9cmwuv1CqCDpOTCNpuklYGFjI4wtwPQChA/4Ew==
nmISikPIeKFk+B/psi+9xdlYDbSAkCQGbONsy9Y/IniumJBWiibI/epwxxurP5fTQtQx4DLqCOxhc8FmzbLhzbhocL7XaflvbChCbhOpNZDEwN3x8+o67WMmQCkYbE2R | 0HoW4ou6G5Zm1xqrFgWuLTj1Y9e6jc4+LU7qrg3fF5s= |
SJjP3FVBAp/5qgyN+uBoErKxvix5hBT0FSs13dl621Q= | 01SjbF6hoeZh5npOrJScYUc+CUOTpE5q4w2C4HkZ0pA=
qi6u0anog8Yl/IdZdO4HlrtM8sfGoxIpXuJCv9QQxMcY2KMPexwj7/+xBuPW8n5tGmKAt/0e+JkD+DjyGTalI/593sZjtC+FDp9KiB3Z/reUxR7wYWWEjJjO80RbrOD4nleOsEM4zSqzsR4bqtSRwqBB/vvbGv0x+bSDPHkFACoszDsunlDq6QzAW7x+yXiiWQuhtNlGyvwxaHGbabAJ0DAV7Zf+gpojYgPiuRP3IYPKEIrmescCmScz4AZvhzKSHvJIn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RCtJpp+XdhmEjlrzxsj2RKH3IL4qBRwM+aimpQc0YtZVVmPL43N9r0jzhp1VKYlVKjSezVXfOLzNXxnYlQ/vUd0Iyw6xYSB526v4Li7bpCDm80pwazejgIdQDcx09du58PoZyTzWWlkM0qkZ0Nue+aS0E7x4F55v/soDLGOaADpK0arRqvKPwmvEWY6S6RVQD2jeOMgK2AK19Thej26QW5H469KdA+w==
app.use((req, res, next) => {
console.log('Time: %d', Date.now())
next()
})
owvtOvcIMpE42D8lmAv3CxUMRe2dAb1N1KgucsiOQ7k=
Uz2gO0mZiDlSnpcgeRSX+MWF7O1qkSzVg8secSFh92g=
yOAMIBK+3ecSUMtLx5BXAyFSMXbyEI6X0PhgOmCDvBMyg2zFsSLHMK/laWxJ1QD0U5sd5bIXfV10jDIym23P7vCJrSeJ7EnIXQtF7RWzDlefxpfb/1G5Ccl1jTO79vLD9sv0OLNsvFFG/hpVqbQvLCy3vlMxETjL8+6G5fenxu7AbTqjf2fqU30MiEOZmY/NAg+LYgyBJqq2wo+AH8mK8w==
HGysLvaNERv/66Kc2aEngMoPCCUmx94veo/8pc4nJEmKfonbjF8gPHZf6hf52cxg+lI9qzdCewPl0wfUvQ/FOi/1JwI7k03W1rJe/A1fIS8=
1zVFb/n3s4cuCXldRIF5bC4BjQN6traurvkqNxOXvk7A28OKt0RpBJqrno8j1Y3OgzshbjSGcCOeKHYfkRyqMeDF1QgPeRi8+A+8xktHZxy2dnFzosgk7va4JRWcc4Rh
// this middleware will not allow the request to go beyond it
app.use((req, res, next) => {
res.send('Hello World')
})
// requests will never reach this route
app.get('/', (req, res) => {
res.send('Welcome')
})
CzriDVLuNdF7o7E8Pfo2pbZ0DOIWk3JZqrRGpR6aDMPksn/pBf2J9eOOFxhozMCj
j0MoIob+/DIFoU1pGOSqMrEmGC7M5q4vB+UeS6KK+szbKA8xTgSBatM9GMyxtcq4VGK3Mo3268wLUEIpa/aVVEXPm1lb40WsKF4BG33r81qOMnseyYxqiEHOwQv76CF+U6v6JOq7W8jPl9uA/19T/RxcpSmd2GgWxYtYq5AeubOPGGMqa00hRzx634j0ilyqpsJ8G5vpKp3221KPjfJEylC944+hMcYUfbyyOydbWANWx39daq87hLno7AHQqofE3HfYb7SdbLzQ/oIhphH2GIP6MFWGvWm1E89kYvUKM2POKNfQezMKCBAYFR+gEWbRJgeqoYmLr8/k3idAHu4eK8iZ0PIHFn79sUFIUT2V9tWsW7EpJ49Q5wCvJ/Ej1od/0GVKAMQyJ+JbEM6gSrSkFN9qMhLkmNR6tfOUhDe00SokhsDcFyWO2eOeQSU7dAOtQO/Wt/t9ZwIVDmcUA6fVb7/RrcEfY8I+mXfUCcTAJFXB75NgZawfIvtnIupfQwBiYdgVLb+5lgF8+DA8z2A72HXRw6m6VbvZFDd1qR2Ta6U50PdfD07q5q3ZzzzxPSIN
9k1cdALbbNEwDDWsOFqBNAizaIpHcwYGlKrJMPjY9sJu+zfO++MXHmtFlakX0RrTIyVLXzpNiZrcHxqtUGIguNlm6PjUP5At/PesoJNEyKGDIqzwcKCOtRPT5xDz0TI/L2jFY4bArGwlyDakQdZA/eNOaZ8Ep61rb5+btbHYovLb4Nz8Uyz4C5P8S4I+on1KJVuGoIbxDSAkWRB0LxTuSNd6vGmoX3rdtJ2X3hPYuWA4cgM8wU7zWqmUa4GEX0d+
app.use((err, req, res, next) => {
console.error(err.stack)
res.status(500).send('Something broke!')
})
路径示例
SD2RgA1ka+4SgkSAZjP4HQwYGbi4mVkFYsjY0WRM2lUUeWJbPvZh0Zekw6xgC/XyrkITaxzvD+AnQAK/L4XrCQyxrmOynqr1+tAWTO1y+wZnwFV+qOJ1C5lNFEcRKqGE
类型 | 例子 |
---|---|
buJymgaSk3TUwnNcz+lgBQ== | MJgXQ979hur1RmIQgTUtvKDyQ57bK4hdUcIH6hihRP4LneMuGnOdpa2CRAn9d16I0DFteMmYgXoXN+FC0ckW6g==
|
D9DnOB1lZ1vC1Aed+mS8Sw== | MJgXQ979hur1RmIQgTUtvKDyQ57bK4hdUcIH6hihRP6hPSimoOwW4EMfCFnrNziX6OIWD3mpwK73ZPamJl8BIe1nuHH6jOGbPAm9zjTBWbQ=
|
z1fmYAxVY1h01uEEdGlBdQ== | MJgXQ979hur1RmIQgTUtvCDtkE13RstAaXxS0ZRVKP7wM4eLUZYiOv2LU2/5TbkIljM1xGO0TWrl48An2Uv34+k0Pw3mP4YS88kuon7ZRfw=
|
IlFBFI6gOb4bq0yJEFNRUw== | MJgXQ979hur1RmIQgTUtvKDyQ57bK4hdUcIH6hihRP41suzX6yNaOX+/kCEjV807e1mNGzffR6s8SGWJAq39xgh2o8RS9xGWwglXNGpvv1r+pTGTQoDG4OaI6Q4mvRLM7+VmWEZmT2lizACn9J1M5wMbkcbkkQoNuh7RAr74BwM=
|
中间件回调函数示例
lmiyy6IMqihborN+623hM3xA3OegoZVTBddgtdzFbPZeFpKenAAM7ePSC31XdcPM3wZxr284cAuedWa0WlpBHdq015mA4NGUdELUfYu6t02+vJoFaYf7s2LGRTjjLqPLOnQeByivJ4QGN+t+B33wLNDrLNzbI3QktvkvWuaEvaI5Amca81iB2p9aVsau6Bk2jzhdv6SL/Yllw8p3gjRYlOGzS91UjJ0q/gNdoKnLbcJhar9Xt09Nj4wOJrwSXMxseTI/cmktVFvj99xqo9m6DY0Ii8iQklw3b/lK1a6bBQHLe7HD93qTfp5qeptiIXxcZC9ypCq7m+lKAbeyDQetaJdoozhoxKkkjQmsPyH6658iWeMbkvcVj9akMJEd2GFdD67Jz/Knuk9yVULuHDYmaPhofGhkJUST62DmFOFaBvByH76VqdllKHHKBt2yJshF
用法 | 例子 |
---|---|
vZJYIPiQEGoWKrw3e3Ct1A== | fa8DsaXGBm/hrLD2ObOvGHoCBLa7QVh91SEXApWFrouukguAdAWTZgp/7ZRfr8uaHQa2h8SW1n/qXesz2wjXwg==
rG0SgWgEIsupm2848h1FQw+A8pmSb20aEKv8Cx4lOMU=
Pq8cfxC4bZmPYj1MWVWt2fN34wL22jnIBW/YvhAIQTpm2YJ4rkOTY20TSIkBq0RZ
|
yvBR+VE3R30/1A3I9ObFeA== | tV0IxsLOqGvtxqIcfQ4Ufhs3f09VtKAQon93MPQlkfQ6XxG+As1hPoGtS+dvtW55ul03r3CT8WMqQrjwVmtjAg==
|
IlFBFI6gOb4bq0yJEFNRUw== | /u0vntyLSCnoNTgX9BK2WbYAdRKQTrjfGB/TSRag2YDMKnt5wIAmdQpY0uim5yCY
|
WgPi2wHgYJJ2/wGmRN2Ltw== | cfle4r6eqIkzFGnFh+rDfKUhPa6FD3M3bTJ8faHeefLIYKXrI0PLbPyQ36muEAsG+6BHTfJcJftjmKgGjKo+MA==
|
JcVSr7mXCLNjI6XdHeTFNOmhcy5lWnQMpYrGT8aVP20StINXTJLVRKEaPGRtWQPK/6bqJfSh9SfKsCPOIFDWii5asUoYyYVMXD+JcbPXfFZBD1lXfsUOXDnN7n9mUTg0/aYx09dEXiXJvywyTpWkypy5hjoVI2K4gKEPWeIJDczRWOsscyH1vjDKW4Pn4QE3
FAh5YrPYHclQpfe0KanhOc7oJEW8YYJn7VDa6RSk/EbhoujIFiuIpme9tfEZ/s84G4U/MdrbmaM/MqqdCeQ7AQZ+3BqJIaxM+e/6T+JP3ys=
// GET /style.css etc
app.use(express.static(path.join(__dirname, 'public')))
193AtUWN8Sgz17YznRUHkKMNO5oEX8xsE30M0DocsarJYZKn7dl6W4k8rl5bwi4VQIIPppp+R0+kIAwnwbBhfmA/x6qtMnszayfDGVnG35lBlmDXg06WFotinarKIaR91/ikZV55/xoBOSUUBpcP0w==
// GET /static/style.css etc.
app.use('/static', express.static(path.join(__dirname, 'public')))
2cKcfBBni88OKy267F+BQZOm4Yigb6NRHDMCvarFCFr9PVkRH/OBn0pwArAJPHaeuZP4VaA+/swBz/G/Q2qtcYNTbnu9triRRKA5r+JACuO9LSaYFDHBvOSF8uePd0r26iwm1he+k7vT6Z/kP7XYsg==
app.use(express.static(path.join(__dirname, 'public')))
app.use(logger())
3RL6yGaS3XyNX+zVt13jgs2pEcXO3xSg/5z0ZzFgKmhgJwWuROUCCPB71qFCnq7zKS9EPShRzKuoPeKNZoxrPi7n672+zWE9hwWKnAfAxhBbqu95R+KSX7nyNrGy4ixb
app.use(express.static(path.join(__dirname, 'public')))
app.use(express.static(path.join(__dirname, 'files')))
app.use(express.static(path.join(__dirname, 'uploads')))