File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const Client = require('./client.js');
66const Session = require ( './session.js' ) ;
77
88const routing = {
9- '/' : async client => '<h1>welcome to homepage</h1><hr>' ,
9+ '/' : async ( ) => '<h1>welcome to homepage</h1><hr>' ,
1010 '/start' : async client => {
1111 Session . start ( client ) ;
1212 return `Session token is: ${ client . token } ` ;
@@ -30,9 +30,9 @@ const routing = {
3030 } ) ,
3131 '/api/method3' : async client => {
3232 if ( client . session ) {
33- return [ ...client . session . entries ( ) ] . map ( ( [ key , value ] ) => {
34- return `<b>${ key } </b>: ${ value } <br>` ;
35- } ) . join ( ) ;
33+ return [ ...client . session . entries ( ) ]
34+ . map ( ( [ key , value ] ) => `<b>${ key } </b>: ${ value } <br>` )
35+ . join ( ) ;
3636 }
3737 return 'No session found' ;
3838 } ,
@@ -64,6 +64,7 @@ http.createServer(async (req, res) => {
6464 } , err => {
6565 res . statusCode = 500 ;
6666 res . end ( 'Internal Server Error 500' ) ;
67+ console . log ( err ) ;
6768 } ) ;
6869 return ;
6970 }
You can’t perform that action at this time.
0 commit comments