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-20 07:03:52 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f11a1d40097e63e5ef98c68f8b2187b7276e174d
f11a1d40
1 parent
0b76ffe6
Loading a Module
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
app.js
logger.js
app.js
View file @
f11a1d4
console
.
log
(
module
);
// module is not global
\ No newline at end of file
var
logger
=
require
(
'./logger'
)
logger
.
log
(
'message'
);
\ No newline at end of file
...
...
logger.js
0 → 100644
View file @
f11a1d4
var
url
=
'http://mylogger.io/log'
;
function
log
(
message
)
{
// Send an HTTP request
console
.
log
(
message
);
}
module
.
exports
.
log
=
log
;
\ No newline at end of file
Please
register
or
login
to post a comment