Fix homepage API 500 by using axios baseURL and stable paginate.
deploy to danak / build_and_deploy (push) Has been cancelled
deploy to danak / build_and_deploy (push) Has been cancelled
Replace self-proxy with direct SSR baseURL, rewrite blog post pagination with async/await, pin mongoose-paginate-v2, and add API error logging. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-6
@@ -72,11 +72,10 @@ export default {
|
||||
},
|
||||
|
||||
axios: {
|
||||
proxy: true
|
||||
},
|
||||
proxy: {
|
||||
// SSR axios requests must hit the same Nuxt process that hosts serverMiddleware (/api).
|
||||
'/api': { target: `http://127.0.0.1:${nuxtPort}` }
|
||||
// SSR calls the integrated Express API directly; browser uses relative /api paths.
|
||||
proxy: false,
|
||||
baseURL: `http://127.0.0.1:${nuxtPort}`,
|
||||
browserBaseURL: '/'
|
||||
},
|
||||
router: {
|
||||
linkActiveClass: 'active-link',
|
||||
@@ -85,7 +84,7 @@ export default {
|
||||
serverMiddleware: ['~/server/index.js'],
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000
|
||||
port: nuxtPort
|
||||
},
|
||||
|
||||
auth: {
|
||||
|
||||
Reference in New Issue
Block a user