Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var file = require('fs');
- http.createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/html'});
- var fd = file.open('default.html','w',function(err){
- if(err)throw err;
- });
- file.appendFile('default.html',"<p>Hi,this to inform you that i really don't care</p>",function(err){});
- return res.end();
- }).listen(8080);
- <!doctype>
- <html lang="en">
- <head>
- <title>File</title>
- </head>
- <body>
- <h1>
- Hi, EveryOne
- </h1>
- </html>
- <p>Hi,this to inform you that i really don't care</p>
Add Comment
Please, Sign In to add comment