import{createServer}from"node:http";importnextfrom"next";constdev=process.env.NODE_ENV!=="production";constapp=next({dev,turbo:true,turbopack:true});consthandle=app.getRequestHandler();app.prepare().then(()=>{createServer((req,res)=>{try{handle(req,res);}catch(e:any){console.log(e.message)}}).listen(3000)console.log("Server is running on http://localhost:3000");});
Top comments (0)