Node.js is a JavaScript-based platform built on Google Chrome’s JavaScript V8 Engine. Node.js allows us to run JavaScript on the server. Create a file name app.js and paste below code like below screenshot After this run below commandnode app screenshot…