Tuesday, February 20, 2018

To run a file in a particular folder as a web server in Node.js...

...navigate into the folder with the .js file at the command line and type:

node yournamehere.js

 
 

...if the first line of the .js file is...

const express = require('express');

 
 

...you are running the Express server!

No comments:

Post a Comment