I am using restinio as my backend API server. Previously I used ReactJS for front-end and solved this proxying issue using "proxy": "http://localhost:4000" in package.json as documented here; https://create-react-app.dev/docs/proxying-api-requests-in-development/.
Now I'm using Next.js and I could use fetch function directly to get data from back-end, but if possible would like to use next-connect as this module has many features that would simplify coding for my current project.
I tried several ways like rewriting path using rewrites module;
module.exports = {
async rewrites() {
return [
{
source: '/about',
destination: '/',
},
]
},
}
but still couldn't solve the problem. How should I go about it?
Thank you.