adding next.js app which calls the fastAPI AND displays date in the app.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
// rewrites: async () => {
|
||||
// return [
|
||||
// {
|
||||
// source: '/api/:path*',
|
||||
// destination:
|
||||
// process.env.NODE_ENV === 'development'
|
||||
// ? 'http://127.0.0.1:8000/api/:path*'
|
||||
// : '/api/',
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
rewrites: async () => {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? 'http://127.0.0.1:8000/api/:path*'
|
||||
: '/api/',
|
||||
},
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
|
||||
Reference in New Issue
Block a user