daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Nov 8th, 2018 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var file = require('fs');
  2. http.createServer(function (req, res) {
  3.   res.writeHead(200, {'Content-Type': 'text/html'});
  4.   var fd = file.open('default.html','w',function(err){
  5.     if(err)throw err;
  6. });
  7. file.appendFile('default.html',"<p>Hi,this to inform you that i really don't care</p>",function(err){});
  8.   return res.end();
  9. }).listen(8080);
  10.    
  11. <!doctype>
  12. <html lang="en">
  13. <head>
  14.     <title>File</title>
  15. </head>
  16. <body>
  17.     <h1>
  18.         Hi, EveryOne
  19.     </h1>
  20. </html>
  21.    
  22. <p>Hi,this to inform you that i really don't care</p>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top