Skip to content

Commit

Permalink
Modified the sample to use the callback on the start method
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 24, 2017
1 parent e3eb1e0 commit 4313cba
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,16 @@ server.addResourceTree({
throw e;

// Start the server
server.start();
server.start(httpServer => {
console.log('Server started with success on the port : ' + httpServer.address().port);

// [...]
// [...]

// Stop the server
server.stop(() => {
console.log('Server stopped with success!');
})
// Stop the server
server.stop(() => {
console.log('Server stopped with success!');
})
});
});
```

Expand Down

0 comments on commit 4313cba

Please sign in to comment.