@@ -8,7 +8,7 @@ import { Mutex } from 'async-mutex';
88
99import updateCommand from '@oclif/plugin-update/lib/commands/update' ;
1010
11- import { HttpToolkitServer } from './httptoolkit -server' ;
11+ import { HttpToolkitServerApi } from './api -server' ;
1212import { checkBrowserConfig } from './browsers' ;
1313import { reportError } from './error-tracking' ;
1414import { delay , ALLOWED_ORIGINS } from './util' ;
@@ -101,15 +101,15 @@ export async function runHTK(options: {
101101 host : '127.0.0.1'
102102 } ) ;
103103
104- // Start a HTK server
105- const htkServer = new HttpToolkitServer ( {
104+ // Start the HTK server API
105+ const apiServer = new HttpToolkitServerApi ( {
106106 configPath,
107107 authToken : options . authToken ,
108108 https : httpsConfig
109109 } ) ;
110110
111111 const updateMutex = new Mutex ( ) ;
112- htkServer . on ( 'update-requested' , ( ) => {
112+ apiServer . on ( 'update-requested' , ( ) => {
113113 updateMutex . runExclusive ( ( ) =>
114114 ( < Promise < void > > updateCommand . run ( [ 'stable' ] ) )
115115 . catch ( ( error ) => {
@@ -129,7 +129,7 @@ export async function runHTK(options: {
129129 ) ;
130130 } ) ;
131131
132- await htkServer . start ( ) ;
132+ await apiServer . start ( ) ;
133133
134134 console . log ( 'Server started in' , Date . now ( ) - certSetupTime , 'ms' ) ;
135135 console . log ( 'Total startup took' , Date . now ( ) - startTime , 'ms' ) ;
0 commit comments