Last active
          July 24, 2019 13:20 
        
      - 
      
 - 
        
Save BRELID/e243f8941d1346069bf97b78edea626d to your computer and use it in GitHub Desktop.  
    Append content in file with NodeJS
  
        
  
    
      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
    
  
  
    
  | var fs = require("fs"); | |
| content = "New content" | |
| fs.appendFile("log.txt", content+"\r\n", (err) => { | |
| if (err) console.log(err); | |
| console.log("Successfully append to File."); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment