Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 7e64b1d

Browse files
committed
chore: merge branch 'dev'
2 parents 84870cc + 65080de commit 7e64b1d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ app.prepare().then(() => {
4444
// redirect all the www request to non-www addr
4545
server.use(reDirectToNakedUrl)
4646
server.use(express.static('static'))
47+
server.use(express.static(`${__dirname}/.next/service-worker.js`))
4748
server.use(helmet())
4849
server.use(
4950
'/model-graphs',
@@ -65,6 +66,10 @@ app.prepare().then(() => {
6566
renderAndCache(req, res, '/sentry', req.query)
6667
)
6768

69+
server.get('/service-worker.js', (req, res) =>
70+
res.sendFile(`${__dirname}/.next/service-worker.js`)
71+
)
72+
6873
// app.render(req, res, '/user', req.query)
6974
server.get('/user/:userId', (req, res) =>
7075
renderAndCache(req, res, '/user', req.query)
@@ -97,6 +102,7 @@ app.prepare().then(() => {
97102
)
98103

99104
server.get('/:community/:thread', (req, res) => {
105+
console.log('default community route')
100106
if (
101107
R.has('preview', req.query) &&
102108
R.has('id', req.query) &&

0 commit comments

Comments
 (0)