mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-06-08 13:39:56 +00:00
links
This commit is contained in:
parent
8fe3bf10f5
commit
e15a2d3989
@ -20,6 +20,10 @@ const engine = ngExpressEngine({
|
|||||||
bootstrap: AppServerModule,
|
bootstrap: AppServerModule,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const hardlinks = {
|
||||||
|
'cwd-detection': 'https://github.com/Eugeny/tabby/wiki/Shell-working-directory-reporting',
|
||||||
|
}
|
||||||
|
|
||||||
function start () {
|
function start () {
|
||||||
const app = express()
|
const app = express()
|
||||||
|
|
||||||
@ -43,6 +47,10 @@ function start () {
|
|||||||
res.sendFile(join(DIST_FOLDER, 'terminal.html'))
|
res.sendFile(join(DIST_FOLDER, 'terminal.html'))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
for (const [key, value] of Object.entries(hardlinks)) {
|
||||||
|
app.get(`/go/${key}`, (req, res) => res.redirect(value))
|
||||||
|
}
|
||||||
|
|
||||||
process.umask(0o002)
|
process.umask(0o002)
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
console.log(`Node Express server listening on http://localhost:${PORT}`)
|
console.log(`Node Express server listening on http://localhost:${PORT}`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user