Created
February 25, 2019 06:31
-
-
Save lqqyt2423/510bab29c60433e9921effd8f3ed0f74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const http = require('http'); | |
const server = http.createServer((req, res) => { | |
console.log(req.url); | |
res.end('simple server'); | |
}); | |
server.on('error', err => { | |
console.log('server error:'); | |
console.log(err); | |
}); | |
server.listen(8001, () => { | |
console.log('simply server listing on 8001 port'); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment