Simple HTTP servers with Node and Express-
Two Lines
Four lines
Don’t forget your packages and package.json:
Modify your package.json so that it has
Otherwise just use the require
syntax to import express
:
Node app without express
Express is very nice, but if you didn’t even want to use npm
at all, you can do all of this using just Node.