| 615 | app.use('/api/speech', speechRouter); | 615 | app.use('/api/speech', speechRouter); |
| 616 | app.use('/api/azure', azureRouter); | 616 | app.use('/api/azure', azureRouter); |
| 617 | | 617 | |
| | 618 | // If all other middlewares fail, send 404 error. |
| | 619 | const notFoundWebpage = fs.readFileSync('./public/error/url-not-found.html', { encoding: 'utf-8' }); |
| | 620 | app.use((req, res, next) => { |
| | 621 | res.status(404).send(notFoundWebpage); |
| | 622 | }); |
| | 623 | |
| 618 | const tavernUrlV6 = new URL( | 624 | const tavernUrlV6 = new URL( |
| 619 | (cliArguments.ssl ? 'https://' : 'http://') + | 625 | (cliArguments.ssl ? 'https://' : 'http://') + |
| 620 | (listen ? '[::]' : '[::1]') + | 626 | (listen ? '[::]' : '[::1]') + |