(app, relpath, publicName = undefined)
| 5 | const port = 3000; |
| 6 | |
| 7 | const serveScript = (app, relpath, publicName = undefined) => { |
| 8 | const abspath = path.resolve(path.join(__dirname, relpath)); |
| 9 | const filename = path.basename(abspath); |
| 10 | app.get(`/scripts/${publicName || filename}`, (req, res) => |
| 11 | res.sendFile(abspath), |
| 12 | ); |
| 13 | }; |
| 14 | |
| 15 | app.get("/", (req, res) => res.sendFile(path.join(__dirname, "index.html"))); |
| 16 |
no outgoing calls
no test coverage detected
searching dependent graphs…