MCPcopy Index your code
hub / github.com/Microck/opencode-studio / startServer

Function startServer

server/index.js:4606–4621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4604
4605// Start watcher on server start
4606async function startServer() {
4607 ['google', 'anthropic', 'openai', 'xai', 'openrouter', 'together', 'mistral', 'deepseek', 'amazon-bedrock', 'azure', 'github-copilot'].forEach(p => importCurrentAuthToPool(p));
4608
4609 const port = await findAvailablePort(DEFAULT_PORT);
4610 app.listen(port, () => {
4611 console.log(`Server running at http://localhost:${port}`);
4612 // Initial sync on startup if enabled
4613 setTimeout(() => {
4614 const studio = loadStudioConfig();
4615 if (studio.githubAutoSync) {
4616 console.log('[AutoSync] Triggering initial sync...');
4617 triggerGitHubAutoSync();
4618 }
4619 }, 5000);
4620 });
4621}
4622
4623if (require.main === module) {
4624 startServer();

Callers 1

index.jsFile · 0.85

Calls 4

importCurrentAuthToPoolFunction · 0.85
loadStudioConfigFunction · 0.85
triggerGitHubAutoSyncFunction · 0.85
findAvailablePortFunction · 0.70

Tested by

no test coverage detected