mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
change backend port from 5001 to 5003
This commit is contained in:
1 parent
ca7f976199
commit
18be821fdb
5 files changed
+20
-17
No files matched your search
+10
-7
@@ -153,14 +153,17 @@ app.all('/api/opencode/*', async (c) => {
|
||||
const isProduction = ENV.SERVER.NODE_ENV === 'production'
|
||||
|
||||
if (isProduction) {
|
||||
app.use('/*', async (c, next) => {
|
||||
if (c.req.path.startsWith('/api/')) {
|
||||
return next()
|
||||
}
|
||||
return serveStatic({ root: './frontend/dist' })(c, next)
|
||||
})
|
||||
app.use('/*', serveStatic({ root: './frontend/dist' }))
|
||||
|
||||
app.get('*', async (c) => {
|
||||
return serveStatic({ path: './frontend/dist/index.html' })(c, async () => {})
|
||||
if (c.req.path.startsWith('/api/')) {
|
||||
return c.notFound()
|
||||
}
|
||||
const fs = await import('fs/promises')
|
||||
const path = await import('path')
|
||||
const indexPath = path.join(process.cwd(), 'frontend/dist/index.html')
|
||||
const html = await fs.readFile(indexPath, 'utf-8')
|
||||
return c.html(html)
|
||||
})
|
||||
} else {
|
||||
app.get('/', (c) => {
|
||||
|
||||
Reference in new issue
Block a user