6
6
7
7
<img align =" right " src =" https://deno.land/logo.svg " height =" 150px " alt =" the deno mascot dinosaur standing in the rain " >
8
8
9
- [ Deno] ( https://deno.com/runtime ) is a _ simple_ , _ modern_ and _ secure_ runtime
10
- for ** JavaScript** and ** TypeScript** that uses V8 and is built in Rust.
11
-
12
- ### Features
13
-
14
- - [ Secure by default.] ( https://deno.land/manual/basics/permissions ) No file,
15
- network, or environment access, unless explicitly enabled.
16
- - Provides
17
- [ web platform functionality and APIs] ( https://deno.land/manual/runtime/web_platform_apis ) ,
18
- e.g. using ES modules, web workers, and ` fetch() ` .
19
- - Supports
20
- [ TypeScript out of the box] ( https://deno.land/manual/advanced/typescript ) .
21
- - Ships only a single executable file.
22
- - [ Built-in tooling] ( https://deno.land/manual/tools#built-in-tooling ) including
23
- ` deno test ` , ` deno fmt ` , ` deno bench ` , and more.
24
- - Includes [ a set of reviewed standard modules] ( https://deno.land/std/ )
25
- guaranteed to work with Deno.
26
- - [ Supports npm.] ( https://deno.land/manual/node )
27
-
28
- ### Install
9
+ [ Deno] ( https://www.deno.com )
10
+ ([ /ˈdiːnoʊ/] ( http://ipa-reader.xyz/?text=%CB%88di%CB%90no%CA%8A ) , pronounced
11
+ ` dee-no ` ) is a JavaScript, TypeScript, and WebAssembly runtime with secure
12
+ defaults and a great developer experience. It's built on [ V8] ( https://v8.dev/ ) ,
13
+ [ Rust] ( https://www.rust-lang.org/ ) , and [ Tokio] ( https://tokio.rs/ ) .
14
+
15
+ Learn more about the Deno runtime
16
+ [ in the documentation] ( https://docs.deno.com/runtime/manual ) .
17
+
18
+ ## Installation
19
+
20
+ Install the Deno runtime on your system using one of the commands below. Note
21
+ that there are a number of ways to install Deno - a comprehensive list of
22
+ installation options can be found
23
+ [ here] ( https://docs.deno.com/runtime/manual/getting_started/installation ) .
29
24
30
25
Shell (Mac, Linux):
31
26
@@ -51,64 +46,49 @@ brew install deno
51
46
choco install deno
52
47
```
53
48
54
- [ Scoop ] ( https://scoop.sh/ ) (Windows):
49
+ ### Build and install from source
55
50
56
- ``` powershell
57
- scoop install deno
58
- ```
51
+ Complete instructions for building Deno from source can be found in the manual
52
+ [ here] ( https://docs.deno.com/runtime/manual/references/contributing/building_from_source ) .
59
53
60
- Build and install from source using [ Cargo ] ( https://crates.io/crates/deno ) :
54
+ ## Your first Deno program
61
55
62
- ``` sh
63
- # Install build dependencies
64
- apt install -y cmake protobuf-compiler # Linux
65
- brew install cmake protobuf # macOS
56
+ Deno can be used for many different applications, but is most commonly used to
57
+ build web servers. Create a file called ` server.ts ` and include the following
58
+ TypeScript code:
66
59
67
- # Build and install Deno
68
- cargo install deno --locked
60
+ ``` ts
61
+ Deno .serve ((_req : Request ) => {
62
+ return new Response (" Hello, world!" );
63
+ });
69
64
```
70
65
71
- See
72
- [ deno_install] ( https://github.com/denoland/deno_install/blob/master/README.md )
73
- and [ releases] ( https://github.com/denoland/deno/releases ) for other options.
74
-
75
- ### Getting Started
76
-
77
- Try [ running a simple program] ( https://examples.deno.land/hello-world ) :
66
+ Run your server with the following command:
78
67
79
68
``` sh
80
- deno run https://examples.deno.land/hello-world.ts
81
- ```
82
-
83
- Or [ setup a simple HTTP server] ( https://examples.deno.land/http-server ) :
84
-
85
- ``` ts
86
- Deno .serve ((_req ) => new Response (" Hello, World!" ));
69
+ deno run --allow-net server.ts
87
70
```
88
71
89
- [ More Examples] ( https://examples.deno.land )
72
+ This should start a local web server on
73
+ [ http://localhost:8000 ] ( http://localhost:8000 ) .
90
74
91
- ### Additional Resources
75
+ Learm more about writing and running Deno programs
76
+ [ in the docs] ( https://docs.deno.com/runtime/manual ) .
92
77
93
- - ** [ The Deno Manual] ( https://deno.land/manual ) ** is a great starting point for
94
- [ additional examples] ( https://deno.land/manual/examples ) ,
95
- [ setting up your environment] ( https://deno.land/manual/getting_started/setup_your_environment ) ,
96
- [ using npm] ( https://deno.land/manual/node ) , and more.
97
- - ** [ Runtime API reference] ( https://deno.land/api ) ** documents all APIs built
98
- into Deno CLI.
99
- - ** [ Deno Standard Modules] ( https://deno.land/std ) ** do not have external
100
- dependencies and are reviewed by the Deno core team.
101
- - ** [ deno.land/x] ( https://deno.land/x ) ** is the registry for third party
102
- modules.
103
- - ** [ Blog] ( https://deno.com/blog ) ** is where the Deno team shares important
104
- product updates and “how to”s about solving technical problems.
78
+ ## Additional resources
105
79
106
- ### Contributing
80
+ - ** [ Deno Docs] ( https://docs.deno.com ) ** : official guides and reference docs for
81
+ the Deno runtime, [ Deno Deploy] ( https://deno.com/deploy ) , and beyond.
82
+ - ** [ Deno Standard Library] ( https://deno.land/std ) ** : officially supported
83
+ common utilities for Deno programs.
84
+ - ** [ deno.land/x] ( https://deno.land/x ) ** : registry for third-party Deno modules.
85
+ - ** [ Developer Blog] ( https://deno.com/blog ) ** : Product updates, tutorials, and
86
+ more from the Deno team.
107
87
108
- We appreciate your help!
88
+ ## Contributing
109
89
110
- To contribute, please read our
111
- [ contributing instructions] ( https://deno.land /manual/references/contributing/ ) .
90
+ We appreciate your help! To contribute, please read our
91
+ [ contributing instructions] ( https://docs. deno.com/runtime /manual/references/contributing/ ) .
112
92
113
93
[ Build status - Cirrus ] : https://github.com/denoland/deno/workflows/ci/badge.svg?branch=main&event=push
114
94
[ Build status ] : https://github.com/denoland/deno/actions
0 commit comments