How to exit from in node JS program Programmatically
FrugalisMinds
Posted on August 18, 2021
One of the way is by using Control + c , but what we are you are getting here is we want to close our program programmatically. In order to achieve this we are going to use the process module present in NodeJS
. Lets see How and Is it a good way of doing it ?
const express = require('express')
const app = express()
app.get('/', (req, res) => {
res.send('Hi Nodejstuts!')
})
const server = app.listen(3000, () => console.log('Server Listening In Nodejstuts'))
💖 💪 🙅 🚩
FrugalisMinds
Posted on August 18, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.