Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In Node.js the new ECMAScript standards can be used without problems, as you don

## An Example Node.js Application

The most common example Hello World of Node.js is a web server:
The most common example Hello World of Node.js is a web server. You can choose between two versions of this example: one using the CommonJS (CJS) module system, using the filename extension `.js` or `.cjs`, and another using the ES Modules (ESM) system, using the filename extension `.mjs`. For more information, see [Understanding MJS and CJS](https://rgbstudios.org/blog/modules-explained-mjs-cjs).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I'd prefer if we linked to Node.js documentation (maybe something like https://nodejs.org/api/esm.html#modules-ecmascript-modules ) or MDN for explanations of the module systems

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, .js can be both ESM or CJS


```cjs
const { createServer } = require('node:http');
Expand Down
Loading