4

I am learning Express and I see that per the docs it contains some of the same functionality as Node. For example, request and response are said to be the exact same as Node.

See here: https://expressjs.com/en/starter/hello-world.html

If Node is not included as a dependency can I assume that they are using a fork from the Node project?

No mention of Node here in the package.json

  "dependencies": {
    "body-parser": "^1.18.2",
    "config": "^1.29.4",
    ...  snip
    "style-loader": "^0.19.1",
    "yarn": "^1.5.1"
  },
skellertor
  • 916
  • 1
  • 9
  • 26
  • 1
    Node isn't a package you install as a dependency of Express. It's the runtime that provides the environment and the javascript engine. – Mark Dec 23 '18 at 03:12
  • node is built into node.js, no need to declare the depends. – dandavis Dec 23 '18 at 03:20

3 Answers3

2

Node isn't an NPM package, it's the thing that runs Node modules, so it wouldn't be listed under package dependencies.

Specific versions of Node could be listed under the engines key, if the package chooses to specify required Node versions to run it. This is optional information however.

blockhead
  • 463
  • 2
  • 5
1

I think the confusion comes from many developers interchangeably calling many apps and APIs "Node Application" or "Express Application".

I believe this is due to overwhelming amount of NodeJS server applications that use express as a package.

Alan Negrete
  • 400
  • 2
  • 11
0

Express is a node.js package, which you probably installed using npm (node package manager). See their getting started: installation (https://expressjs.com/en/starter/installing.html) which installs express through npm. Node.js is an environment for server side javascript, and express is library for node.js.

robert
  • 731
  • 1
  • 5
  • 22