[READ-ONLY] Mirror of https://github.com/danielroe/nuxt3-playground. Playground for Nuxt3
0

Configure Feed

Select the types of activity you want to include in your feed.

nuxt3-playground / test.mjs
519 B 23 lines
1import { handler } from './.netlify/functions-internal/server/server.mjs' 2import serveStatic from 'serve-static' 3import { createServer } from 'http' 4 5const serve = serveStatic('./dist') 6 7const server = createServer(async (req, res) => { 8 if (req.url.startsWith('/_nuxt')) { 9 return serve(req, res) 10 } 11 const r = await handler({ 12 path: req.url, 13 headers: {} 14 }) 15 res.statusCode = r.statusCode 16 for (const n in r.headers) { 17 res.setHeader(n, r.headers[n]) 18 } 19 res.end(r.body) 20}) 21 22server.listen(3000) 23