Node Basics

From rbachwiki
Revision as of 23:34, 2 April 2018 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Run a Node App

terminal

node filename.js

You can execute node code in the terminal by typing

node 

This will give you a node command prompt

Node Modules

const fs = require('fs');
// this will require the filesystem module
fs.appendFile('greetings.txt', 'hello', function(e){
  if(e){
     console.log('error')
       }
});

Nodejs api List

Back To Top- Home - Category