1 Star 0 Fork 0

兴博软件/EspruinoDocs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app.js 535 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* node.js script that creates a webserver to serve up the pages from the html directory */
var express = require('express');
var app = express();
app.all('/*', function(req, res, next) {
if (!req.url.match(/.*\/?\./)) {
req.url += '.html';
}
console.log('returning: ' + req.url);
return express.static(__dirname + '/html')(req, res, next);
});
app.listen(process.env.PORT || 3040, function(app){
var port = this.address().port;
console.log('** EspruinoDocs - running on http://localhost:%s/Original **', port);
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lalbe/EspruinoDocs.git
git@gitee.com:lalbe/EspruinoDocs.git
lalbe
EspruinoDocs
EspruinoDocs
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385