Egg.js accesses static resources

1.publicconfig.default.js

clipboard.png
clipboard.png


clipboard.png


clipboard.png


clipboard.png

question: why http://localhost:9999 cannot directly access the front-end interface, and why I cannot find the http://localhost:9999/device_monitor path at the address.

Apr.13,2022

there is no route for'/ device_monitor''in the background, so it is 404 and can be equipped with a global matching route

router.get('/*', () => {
  this.ctx.body = fs.createReadStream('index.htmlpath')
 })

have you solved it yet?

Menu