Skip to content

Commit

Permalink
feat: add proxy console info
Browse files Browse the repository at this point in the history
  • Loading branch information
radyakaze committed Aug 12, 2024
1 parent 8aa214b commit 097513a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineNuxtModule<ModuleOptions>({

let serverConfig = `export default []`

consola.info('Nuxt Proxy Party: Load server.config')
consola.start('Nuxt Proxy Party: Started')
try {
serverConfig = await readFile(serverConfigPath, 'utf8')
}
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default defineNitroPlugin(async ({ router }) => {
const handler = proxyHandler(config)
router.use(config.baseUrl, handler)
router.use(`${config.baseUrl}/**`, handler)

consola.success(`[Nuxt Proxy Party] Proxy created: ${config.baseUrl} -> ${config.target}`)
})
}
}
Expand Down

0 comments on commit 097513a

Please sign in to comment.