@@ -49,7 +49,7 @@ export const server = Bun.serve({
4949 const requestPath = new URL ( request . url ) . pathname ;
5050 console . log ( `\n${ request . method } ${ requestPath } ` ) ;
5151 if ( opts . hot && request . url . endsWith ( HOT_CMD ) ) {
52- console . log ( `Server: Got '${ HOT_CMD } ' request, trying to upgrade ...` ) ;
52+ console . log ( `Server: Got '${ HOT_CMD } ' request, upgrading ...` ) ;
5353 return server . upgrade ( request ) ;
5454 }
5555 let filePath = join ( ROOT , requestPath ) ;
@@ -75,7 +75,7 @@ export const server = Bun.serve({
7575 }
7676 ) ;
7777 }
78- return new Response ( file , { headers :{ "Content-Type" : file . type } } ) ;
78+ return new Response ( file , { headers : { "Content-Type" : file . type } } ) ;
7979 } ,
8080 error : ( error ) => {
8181 if ( "ENOENT" === error . code ) {
@@ -87,17 +87,17 @@ export const server = Bun.serve({
8787 port : PORT ,
8888 websocket : {
8989 open : ( ws ) => {
90- console . log ( `WebSocket: Client connected. Subscribe to '${ HOT_CMD } '` ) ;
9190 ws . subscribe ( HOT_CMD ) ;
91+ console . log ( `WebSocket: Client subscribed to '${ HOT_CMD } '` ) ;
9292 } ,
9393 message : ( ws , message ) => {
94- console . log ( `WebSocket: Client trying to communicate: ` , ws , message ) ;
94+ console . log ( `WebSocket: Client trying to communicate: ` , message ) ;
9595 } ,
9696 close : ( ws ) => {
97- console . log ( `WebSocket: Client disconnected...` ) ;
9897 ws . unsubscribe ( HOT_CMD ) ;
98+ console . log ( `WebSocket: Client disconnected...` ) ;
9999 }
100100 }
101101} ) ;
102102
103- console . log ( `Started Web Server at: ${ server . protocol } ://${ server . hostname } :${ server . port } \n` ) ;
103+ console . log ( `\nStarted Web Server at: ${ server . protocol } ://${ server . hostname } :${ server . port } \n` ) ;
0 commit comments