Module System & Permissions
Understand Deno's URL-based module system and its granular permission model for secure execution.
Deno Modules: Building Blocks
In Deno, applications are built using modules. Think of modules as individual files that contain related code, like functions, classes, or variables.
They help keep your code organized and reusable, preventing your project from becoming one giant, hard-to-manage file.
URLs as Module Paths
Unlike Node.js, Deno doesn't use a node_modules folder. Instead, Deno imports modules directly using URLs or file paths.
- Local Files: Use relative or absolute paths (e.g.,
./my_module.ts). - Remote Files: Use full URLs (e.g.,
https://deno.land/std/fs/mod.ts).
This simple approach makes dependency management very straightforward!
All lessons in this course
- Deno Runtime Essentials
- Module System & Permissions
- Developing Local Deno Apps
- Testing Deno Applications