How to do it...

  1. Create a new file named debugging.js
  2. Initialize a new ExpressJS application:
      const express = require('express') 
      const app = express() 
  1. Add a route method to handle GET requests for any path:
      app.get('*', (request, response, next) => { 
          response.send('Hello there!') 
      }) 
  1. Listen on port 1337 for new connections:
      app.listen( 
          1337, 
          () => console.log('Web Server running on port 1337'), 
      ) 
  1. Save the file
  2. Open a terminal and run:
  3. On Windows:
      set DEBUG=express:* node debugging.js
  1. On Linux or MacOS:
      DEBUG=express:* node debugging.js 
  1. In your web browser, navigate to:
      http://localhost:1337/
  1. Observe your terminal's output for logs
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.28.247