Toggle navigation
Toggle navigation
This project
Loading...
Sign in
I_Jemin
/
Node-Study
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
I_Jemin
2018-03-22 00:55:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e969f004d189ccf3447ab2555400c7f1acf6c227
e969f004
1 parent
87958a8b
HTTP connection event
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
app.js
app.js
View file @
e969f00
const
Logger
=
require
(
'./logger'
);
const
logger
=
new
Logger
();
const
http
=
require
(
'http'
);
logger
.
on
(
'messageLogged'
,
(
arg
)
=>
{
console
.
log
(
'Listener called'
,
arg
);
});
const
server
=
http
.
createServer
();
logger
.
log
(
'message'
);
server
.
on
(
'connection'
,(
socket
)
=>
{
console
.
log
(
'New Connection...'
);
}
);
server
.
listen
(
3000
);
console
.
log
(
'Listening on port 3000....'
);
...
...
Please
register
or
login
to post a comment