@@ -10,7 +10,7 @@ const api = new Map();
1010
1111const apiPath = './api/' ;
1212
13- const cacheFile = name => {
13+ const cacheFile = ( name ) => {
1414 const filePath = apiPath + name ;
1515 const key = path . basename ( filePath , '.js' ) ;
1616 try {
@@ -27,14 +27,14 @@ const cacheFile = name => {
2727 }
2828} ;
2929
30- const cacheFolder = path => {
30+ const cacheFolder = ( path ) => {
3131 fs . readdir ( path , ( err , files ) => {
3232 if ( err ) return ;
3333 files . forEach ( cacheFile ) ;
3434 } ) ;
3535} ;
3636
37- const watch = path => {
37+ const watch = ( path ) => {
3838 fs . watch ( path , ( event , file ) => {
3939 cacheFile ( file ) ;
4040 } ) ;
@@ -62,9 +62,9 @@ const server = http.createServer(async (req, res) => {
6262
6363const ws = new WebSocket . Server ( { server } ) ;
6464
65- ws . on ( 'connection' , connection => {
65+ ws . on ( 'connection' , ( connection ) => {
6666 console . log ( 'Connected ' + connection . remoteAddress ) ;
67- connection . on ( 'message' , async message => {
67+ connection . on ( 'message' , async ( message ) => {
6868 console . log ( 'Received: ' + message ) ;
6969 const obj = JSON . parse ( message ) ;
7070 const { method, args } = obj ;
0 commit comments