/node-express-fact

Get a simple fact related to web development

Primary LanguageJavaScriptMIT LicenseMIT

node-express-fact

Get a simple fact related to web development

Links

Requirements

  • A browser (e.g., Chrome)
  • A text editor (e.g., VS Code, or Notepad++, or Chrome)

Benefits

  • Node.js non-blocking event loop supports many concurrent requests
  • Express framework for web apps offers concise, easy-to-use API
  • Built-in objects for application, request, response, with HTTP verb methods

Prerequisites

  1. Node.js installed
  2. npm Node Package Manager (comes with Node.js)

Install Dependencies Locally

npm install

Start App Locally

"Open PowerShell Here as Admin" and start your app with node:

npm run dev

Open a Browser Client

  1. Open a web browser. Try these URLs
  2. http://127.0.0.1:3002/ or http://localhost:3002/.
  3. http://localhost:3002/fact
  4. http://localhost:3002/fact/0
  5. http://localhost:3002/fact/?id=1

Terms

See Also