This code works fine with express server installed and imported, but api are commented. #!/usr/bin/env node // !!! DO NOT REMOVE THE SHEBANG ON TOP OF THE FILE, WHICH SPECIFIES THIS APP TO BE EXECUTED BY NODE.JS !!! const express = require('express'); const app = express(); const port = 3000; // app.get('/', (req, res) => { // res.send('Hello, Express! Exd jawad'); // }); // app.listen(port, () => { // console.log(`Server is listening on port exdddd ${port}`); // }); // // Define a route to get a list of items // app.get('/items', (req, res) => { // const items = ['Item 1', 'Item 2', 'Item 3']; // res.json(items); // }); function helloWorld() { console.log("EXD expresss 11") console.log('app ====', app) console.log('port ====', port) console.log("EXD expresss 22") }; helloWorld(); but when i un-comment the api lines error occurs in log book which i mentioned above in earlier reply. So, I think if there is problem in code or application e.g (problem in express server) then basic code with comment should not works. because i have should express related things in console.log but it shows me express related function in logbook.
... View more