NextJS build with flask port
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
I was using the NextJS flask starter and it had this code in the config.
this works on next dev but not when i do next build and next start. how can make it work on production?
/** @type {import('next').NextConfig} */
const nextConfig = {
rewrites: async () => {
return [
{
source: '/api/:path*',
destination:
process.env.NODE_ENV === 'development'
? 'http://127.0.0.1:5328/api/:path*'
: '/api/',
},
]
},
}
module.exports = nextConfig
this works on next dev but not when i do next build and next start. how can make it work on production?
2 Replies
Masai LionOP
nvm i goti t
European pilchard
How’d u fix