https://github.com/stuymedova/deno-node-comparison
[DEMO] Exploring the differences between Deno and Node.js
https://github.com/stuymedova/deno-node-comparison
deno denoland node node-js nodejs
Last synced: about 2 months ago
JSON representation
[DEMO] Exploring the differences between Deno and Node.js
- Host: GitHub
- URL: https://github.com/stuymedova/deno-node-comparison
- Owner: stuymedova
- Created: 2021-06-20T04:59:05.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T10:19:44.000Z (almost 4 years ago)
- Last Synced: 2025-01-09T17:04:51.069Z (over 1 year ago)
- Topics: deno, denoland, node, node-js, nodejs
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deno and Node.js Comparison
## Summary
The main differences of Deno:
- Out of the box TypeScript support **(ex. 2)**
- ES Modules support (doesn't support `require()`) **(ex. 2 & 3)**
- No `package.json` or `node_modules`. Remote modules are stored in the system's cache, unless specified otherwise **(ex. 2 & 3)**
- Import modules via URLs from anywhere (as opposed to only npm) **(ex. 2 & 3)**
- File, network, and environment access need to be enabled explicitly (no access by default) **(ex. 4 & 5)**
Ex. = Example
## Overview
```
.
├── deno
│ ├── 1_hello-world
│ │ └── app.js
│ ├── 2_local-modules
│ │ ├── app.js
│ │ └── easings.ts
│ ├── 3_remote-modules
│ │ └── app.js
│ ├── 4_http-server
│ │ └── webserver.js
│ └── 5_static-server
│ ├── static
│ │ └── index.html
│ └── app.js
│
└── node
├── 1_hello-world
│ └── app.js
├── 2_local-modules
│ ├── node_modules
│ │ └── …
│ ├── app.js
│ ├── easings.js
│ ├── easings.ts
│ ├── package.json
│ └── package-lock.json
├── 3_remote-modules
│ ├── node_modules
│ │ └── …
│ ├── app.js
│ ├── package.json
│ └── package-lock.json
├── 4_http-server
│ └── webserver.js
└── 5_static-server
├── node_modules
│ └── …
├── static
│ └── index.html
├── app.js
├── package.json
└── package-lock.json
```
## Prerequisites
- [Deno](https://deno.land)
- [Node.js](https://nodejs.org/) and [npm](https://www.npmjs.com/)