adding next.js app which calls the fastAPI AND displays date in the app.

This commit is contained in:
lucas.oskorep
2023-07-10 21:21:41 -04:00
parent aad7babb2c
commit d24a340c15
6 changed files with 46 additions and 29 deletions

View File

@@ -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