About These Pages
Assumptions
Most of these pages — especially those with an Instructions section — assume:
- you have a JavaScript runtime installed (as stated on the Prerequisites page);
- you have some knowledge and understanding of the JavaScript runtime you have installed (e.g., you know how to use a
package.jsonin Node ordeno.jsonfile in Deno); and - you are building server-side HTTP applications.
Zero Dependencies
Although Drash has zero dependencies — meaning you could run it in the browser, these pages are written assuming you are using Drash to build server-side HTTP applications.
Deno Import Statements
All Deno import statements will prefix packages with the npm: specifier for simplicity. We assume you are familiar with Deno’s specifiers, but here is a link to learn more just in case: https://deno.com/blog/not-using-npm-specifiers-doing-it-wrong .
Page Order
The pages in the sidebar are ordered (from top to bottom) in a way that we feel will help you:
- start building applications quickly; and
- understand the code you are writing/using.
It is not required that you read the pages in order, but we greatly recommend it for the reasons stated above.
| Section | What it covers |
|---|---|
| Getting Started | What Drash is, what you need installed, and building your first app step by step |
| Quickstart | A complete app per runtime |
| Concepts | The framework’s shape, HTTP applications, resources, the native/polyfill modules, chains, and builders |
| Resources | Writing resources, and grouping them to share prefixes and middleware |
| Requests | What a resource receives, and reading path and query params |
| Tutorials | Using pre-built middleware, writing your own, and handling errors |
| Glossary | Terms used throughout these pages |
Looking for finished applications you can run? Those are under Examples.
Concepts Pages
Some pages will recommend you read pages under the Concepts. Concepts go over:
- a breakdown of the framework;
- what an HTTP application is and what it assembles;
- how resources play a role in the HTTP module’s
Application; - why native and polyfill modules exist;
- how chains work under the hood; and
- why builders assemble your application.
It is not required that you read the Concepts pages, but we greatly recommend it so you are aware of the design decisions made in Drash and how it works under the hood.
Tutorial Format
All tutorial pages have an Instructions section. They guide you in building applications from the ground up. Their page format is explained below:
| Section | What it contains |
|---|---|
| Overview | A high-level overview of what the tutorial teaches, recommended reading beforehand, and the knowledge we hope you gain by the end. |
| Instructions | Steps that build a tiny HTTP application from scratch — the end state of the directory tree, example code for different runtimes, and comments explaining it. |
| Verification | Steps to help you verify the code you wrote is working. |
You must read your runtime’s documentation
These pages reference running your code (e.g., deno run --allow-net app.ts). Since instructions vary by runtime and operating system, it is best you read your runtime’s documentation on running code.
Core, Standard, and Modules
You will notice the Core, Standard, and Modules sections under the Reference pages. These three sections reflect the codebases of the entire Drash framework, and are ordered lowest-level first:
- Core — types, interfaces, and classes with minimal implementation. It contains the lowest level APIs and helps build the Standard and Modules codebases.
- Standard — similar to Deno’s and Go’s standard libraries, but smaller. Intended as standalone code and as code to help build the Modules codebase.
- Modules — implements the most functionality, such as processing HTTP requests. Imports from Standard and Core.
The Framework page covers these codebases in more detail.
Glossary
View our Glossary page for definitions of terms (words/phrases) and acronyms we use. It is heavily inspired by the MDN Web Docs Glossary for clarity and ease of use.
All of the terms and acronyms we use are used in the context of Drash unless otherwise stated.
A Note from Us
We strive to prevent ambiguity in our writing as much as possible. We want you to be able to understand the code you are using so you can develop with confidence. However, we don’t always get it right (our apologies in advance!). If our writing isn’t clear, has typos, is not accessible, or you have suggestions to help improve these pages, please let us know by filing an issue . We appreciate everyone’s help in making these pages better for everyone!