You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Next application, it is deployed on IIS7.
I am using pages directory and node for the api to get sql Server Data.
Till the release 13.4.12 it works fine.
After that release it does not work, everything is bad.
Css and images are not loaded and also the dynamic search is not correct, there is always 404 error
Can you suggest some solution?
what can I do? I use the last versione of IISnode 0.2.21 and a Server.js file that is launched by iis with the iisnode handler:
// eslint-disable-next-line no-console
console.log( > Server listening at http://${serverConfig.hostname}:${serverConfig.port} as ${serverEnv} env
)
})
Is there anybody that can help me?
Do you need some more config files?
The text was updated successfully, but these errors were encountered:
I have a Next application, it is deployed on IIS7.
I am using pages directory and node for the api to get sql Server Data.
Till the release 13.4.12 it works fine.
After that release it does not work, everything is bad.
Css and images are not loaded and also the dynamic search is not correct, there is always 404 error
Can you suggest some solution?
what can I do? I use the last versione of IISnode 0.2.21 and a Server.js file that is launched by iis with the iisnode handler:
process.env.NODE_ENV = 'production'
process.chdir(__dirname)
const NextServer = require('next/dist/server/next-server').default
const http = require('http')
const path = require('path')
const url = require('url')
const nextConfig = require('./next.config.json')
// Make sure commands gracefully respect termination signals (e.g. from Docker)
process.on('SIGTERM', () => process.exit(0))
process.on('SIGINT', () => process.exit(0))
const getPort = (defaultPort) => {
const envPort = process.env.PORT
if (typeof envPort === 'undefined') {
return defaultPort
}
const parsedPort = parseInt(envPort, 10)
return Number.isNaN(parsedPort) ? envPort : parsedPort
}
const getEnv = (defaultEnv) => {
const env = process.env.APP_ENV || process.env.NODE_ENV
if (typeof env !== 'undefined') {
return env
}
return defaultEnv
}
let nextRequestHandler
const server = http.createServer(async (req, res) => {
const parsedUrl = url.parse(req.url, true)
try {
await nextRequestHandler(req, res, parsedUrl)
} catch (err) {
// eslint-disable-next-line no-console
console.error(err)
}
})
const serverEnv = getEnv('production')
const serverConfig = {
hostname: '0.0.0.0',
port: getPort(3000),
dir: path.join(__dirname),
dev: serverEnv === 'development',
conf: nextConfig
}
server.listen(serverConfig.port, serverConfig.hostname, (err) => {
if (err) {
// eslint-disable-next-line no-console
console.error('Failed to start server', err)
}
const nextServer = new NextServer(serverConfig)
nextRequestHandler = nextServer.getRequestHandler()
// eslint-disable-next-line no-console
console.log(
> Server listening at http://${serverConfig.hostname}:${serverConfig.port} as ${serverEnv} env
)
})
Is there anybody that can help me?
Do you need some more config files?
The text was updated successfully, but these errors were encountered: