Tag: 干舷

在express中追加urlpath

我正在使用freeboard.iobuild立干舷。 我使用express在节点服务器上运行它。 我用 router.get('/', function(req, res, next) { res.sendFile(path.join(__dirname + '/index.html')); }); 当基础路线被击中时发送干舷html文件。 不过,为了使freeboard加载我保存的仪表板,我需要将#source = dashboard.json附加到url。 所以最后的url看起来像 http://localhost:8080/#source=dashboard.json 有什么办法,我可以做到这一点使用快递? 当我打localhost时:8080 /我想附加到URLpath#source = dashboard.json,并用index.html文件响应。 谢谢!