File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,8 @@ import path from "pathe"
44const APP_DIR = path . join ( os . homedir ( ) , ".local" , "share" , "copilot-api" )
55
66const GITHUB_TOKEN_PATH = path . join ( APP_DIR , "github_token" )
7- const LOG_PATH = path . join ( APP_DIR , "logs" )
8- const LOG_FILE = path . join ( LOG_PATH , "app.log" )
97
108export const PATHS = {
119 APP_DIR ,
1210 GITHUB_TOKEN_PATH ,
13- LOG_PATH ,
14- LOG_FILE ,
1511}
Original file line number Diff line number Diff line change @@ -6,30 +6,30 @@ import { serve, type ServerHandler } from "srvx"
66
77import { initializeApp } from "./lib/initialization"
88import { logger } from "./lib/logger"
9- import { initializePort } from "./lib/port"
109import { server } from "./server"
1110
12- export async function runServer ( options : {
11+ interface RunServerOptions {
1312 port: number
1413 verbose: boolean
1514 logFile ? : string
16- } ) : Promise < void > {
15+ }
16+
17+ export async function runServer ( options : RunServerOptions ) : Promise < void > {
1718 if ( options . verbose ) {
1819 consola . level = 5
1920 consola . info ( "Verbose logging enabled" )
2021 }
2122
22- const port = await initializePort ( options . port )
2323 await logger . initialize ( options . logFile )
2424
2525 await initializeApp ( )
2626
27- const serverUrl = `http://localhost:${ port } `
27+ const serverUrl = `http://localhost:${ options . port } `
2828 consola . box ( `Server started at ${ serverUrl } ` )
2929
3030 serve ( {
3131 fetch : server . fetch as ServerHandler ,
32- port,
32+ port : options . port ,
3333 } )
3434}
3535
You can’t perform that action at this time.
0 commit comments