silverwolf-x's picture
download
raw
599 Bytes
const next = require('next')
const express = require('express')
const dev = process.env.NODE_ENV !== 'production'
const dir = __dirname
const port = process.env.PORT || 3000
const app = next({ dev, dir })
const handleNextRequests = app.getRequestHandler()
app.prepare().then(() => {
const server = express()
server.use(express.json({ limit: '5mb' }))
server.all('*', (req, res) => {
req.fromCustomServer = true
handleNextRequests(req, res)
})
server.listen(port, (err) => {
if (err) {
throw err
}
console.log(`> Ready on http://localhost:${port}`)
})
})

Xet Storage Details

Size:
599 Bytes
·
Xet hash:
c3ad7e39dc7b7a239a742156dd924817334abe7f01f97abb6082cb410a72994a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.