Blog

Basic Express JS

Rahmat Subandi / 08 May, 2020

1 min read––– views

Step One

The first step when you want to use Express Js is:

Open the website Express.js

Then open to Terminal

typing:

terminal
npm install express --save

To run it, namely by:

terminal
node .\app.js

And to use a server that automatically restarts every time there is a change, you need to install Nodemon

how to type:

terminal
npm install -g nodemon

The -g function is a global server, so you can access it anywhere

Then to run the server, type:

terminal
nodemon.cmd .\app.js

But don't forget that even though using nodemon we have to refresh the browser

To use an ejs template please open this link EJS

How to install it:

terminal
npm install ejs

And what next?