File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed
cheatsheets/javascript/deno/modules Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ Example page:
2424- [ https://deno.land/x/ ] ( https://deno.land/x/denosaur )
2525
2626
27- ## Oak
27+ ## Web server
2828
29- From the [ deno.land/x/oak/] ( https://deno.land/x/oak/#oak ) module.
29+ Demo of using the [ deno.land/x/oak/] ( https://deno.land/x/oak/#oak ) module.
3030
3131The ` Application ` class wraps the ` serve() ` function from the ` http ` package.
3232
@@ -35,7 +35,7 @@ Middleware is added with the `.use()` method.
3535A Hello World server:
3636
3737- ` index.ts `
38- ``` javascript
38+ ``` typesript
3939 import { Application } from "https://deno.land/x/oak/mod.ts";
4040
4141 const app = new Application();
@@ -56,3 +56,29 @@ $ deno run --allow-net index.ts
5656View in the browswer:
5757
5858- http://localhost:8000
59+
60+
61+ ## Colors
62+
63+ Demo of using the [ deno.land/x/color] ( https://deno.land/x/color#color ) module.
64+
65+ - ` index.ts ` - using TypeScript
66+ ``` typescript
67+ import clc from ' https://deno.land/x/color/index.ts'
68+
69+ console .log (clc .red .text (" I am red" ))
70+
71+ console .log (clc .bgYellow .text (" I am bgYellow" ))
72+
73+ console .log (clc .reset .text (" I am reset" ))
74+ console .log (clc .bright .text (" I am bright" ))
75+ ```
76+ - ` index.js ` - JavaScript alternative .
77+ ` ` ` javascript
78+ import clc from 'https://deno.land/x/color/index.js
79+
80+ console.log(clc.red.text("I am red"))
81+
82+ // ...
83+ ` ` `
84+
You can’t perform that action at this time.
0 commit comments