I am very very sad that there is no example with custom server like express, and no tutorial how to step by step adjust it.
I was trying a bunch of configuration and i still have
frontend_1 | /.next/service-worker.js
frontend_1 | Error: ENOENT: no such file or directory, stat '/.next/service-worker.js'
Hello,
I am very very sad that there is no example with custom server like express, and no tutorial how to step by step adjust it.
I was trying a bunch of configuration and i still have frontend_1 | /.next/service-worker.js frontend_1 | Error: ENOENT: no such file or directory, stat '/.next/service-worker.js'
router.get('/service-worker.js',async (req, res) => { var pathname = '/service-worker.js' const filePath = join(__dirname, '../../.next', pathname); app.serveStatic(req, res, filePath) })
const filePath = join(dirname, '../..', pathname); const filePath = join(dirname, '.next', '/service-worker.js')
What is wrong ? Do i have some missing configuration in nextjs to serve that files ?