mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
refactor: consolidate environment config and API handling
- Update database paths and port configuration - Remove backend config.ts and sessions route - Add mobile file preview and files API - Clean up shared constants and provider hooks
This commit is contained in:
1 parent
0db354048d
commit
8a56bc208d
32 files changed
+301
-512
No files matched your search
@@ -3,15 +3,18 @@
|
||||
import { writeFile } from 'fs/promises'
|
||||
import { join, dirname } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import {ENV} from '../backend/src/config'
|
||||
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const OPENCODE_SERVER_URL = process.env.OPENCODE_SERVER_URL || 'http://localhost:5561'
|
||||
|
||||
const OPENCODE_URL = ENV.VITE_API_URL + '/api/opencode'
|
||||
|
||||
async function generateOpenAPISpec() {
|
||||
console.log(`📥 Fetching OpenAPI spec from ${OPENCODE_SERVER_URL}/doc...`)
|
||||
console.log(`📥 Fetching OpenAPI spec from ${OPENCODE_URL}/doc`)
|
||||
|
||||
try {
|
||||
const response = await fetch(`${OPENCODE_SERVER_URL}/doc`, {
|
||||
const response = await fetch(`${OPENCODE_URL }/doc`, {
|
||||
headers: {
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user