{"id":18402562,"url":"https://github.com/wingkwong/deno-playground","last_synced_at":"2026-05-18T03:11:25.495Z","repository":{"id":95977792,"uuid":"265126720","full_name":"wingkwong/deno-playground","owner":"wingkwong","description":"My Deno Playground","archived":false,"fork":false,"pushed_at":"2020-05-19T03:43:17.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T07:23:48.115Z","etag":null,"topics":["deno","playground"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wingkwong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"wingkwong","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-05-19T02:57:50.000Z","updated_at":"2023-04-15T15:21:21.000Z","dependencies_parsed_at":"2023-07-06T08:00:39.850Z","dependency_job_id":null,"html_url":"https://github.com/wingkwong/deno-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wingkwong/deno-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fdeno-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fdeno-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fdeno-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fdeno-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingkwong","download_url":"https://codeload.github.com/wingkwong/deno-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fdeno-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","playground"],"created_at":"2024-11-06T02:42:49.650Z","updated_at":"2026-05-18T03:11:25.481Z","avatar_url":"https://github.com/wingkwong.png","language":"TypeScript","funding_links":["https://github.com/sponsors/wingkwong"],"categories":[],"sub_categories":[],"readme":"# deno-playground\n\nMy Deno Playground\n\n\u003cimg height=180 src=\"https://upload.wikimedia.org/wikipedia/commons/8/84/Deno.svg\"\u003e\n\n## Install Deno\n\n```\nbrew install deno\n```\n\nDeno Help\n\n```\ndeno 1.0.0\nA secure JavaScript and TypeScript runtime\n\nDocs: https://deno.land/std/manual.md\nModules: https://deno.land/std/ https://deno.land/x/\nBugs: https://github.com/denoland/deno/issues\n\nTo start the REPL:\n  deno\n\nTo execute a script:\n  deno run https://deno.land/std/examples/welcome.ts\n\nTo evaluate code in the shell:\n  deno eval \"console.log(30933 + 404)\"\n\nUSAGE:\n    deno [OPTIONS] [SUBCOMMAND]\n\nOPTIONS:\n    -h, --help                     Prints help information\n    -L, --log-level \u003clog-level\u003e    Set log level [possible values: debug, info]\n    -q, --quiet                    Suppress diagnostic output\n    -V, --version                  Prints version information\n\nSUBCOMMANDS:\n    bundle         Bundle module and dependencies into single file\n    cache          Cache the dependencies\n    completions    Generate shell completions\n    doc            Show documentation for a module\n    eval           Eval script\n    fmt            Format source files\n    help           Prints this message or the help of the given subcommand(s)\n    info           Show info about cache or info related to source file\n    install        Install script as an executable\n    repl           Read Eval Print Loop\n    run            Run a program given a filename or url to the module\n    test           Run tests\n    types          Print runtime TypeScript declarations\n    upgrade        Upgrade deno executable to given version\n\nENVIRONMENT VARIABLES:\n    DENO_DIR             Set deno's base directory (defaults to $HOME/.deno)\n    DENO_INSTALL_ROOT    Set deno install's output directory\n                         (defaults to $HOME/.deno/bin)\n    NO_COLOR             Set to disable color\n    HTTP_PROXY           Proxy address for HTTP requests\n                         (module downloads, fetch)\n    HTTPS_PROXY          Same but for HTTPS\n```\n\nYou can run both TypeScript (.ts) files, or JavaScript (.js) files.\n\n```\n➜  ~ deno run  https://deno.land/std/examples/welcome.ts\nDownload https://deno.land/std/examples/welcome.ts\nWarning Implicitly using master branch https://deno.land/std/examples/welcome.ts\nCompile https://deno.land/std/examples/welcome.ts\nWelcome to Deno 🦕\n```\n\n## Deno Code Examples\n\nCheck out via https://deno.land/std/examples/.\n\n- cat.ts prints the content a list of files provided as arguments\n- catj.ts prints the content a list of files provided as arguments\n- chat/ an implementation of a chat\n- colors.ts an example of\n- curl.ts a simple implementation of curl that prints the content of the URL specified as argument\n- echo_server.ts a TCP echo server\n- gist.ts a program to post files to gist.github.com\n- test.ts a sample test suite\n- welcome.ts a simple console.log statement (the first program we ran above)\n- xeval.ts allows you to run any TypeScript code for any line of standard input received. Once known as deno xeval but since removed from the official command.\n\n## Hello World\n\n```\nimport { serve } from 'https://deno.land/std/http/server.ts'\nconst s = serve({ port: 8000 })\nconsole.log('http://localhost:8000/')\nfor await (const req of s) {\n  req.respond({ body: 'Hello World\\n' })\n}\n```\n\nRun it using ``deno run app.ts``. Deno downloads all the required dependencies. \n\n```\nCompile file:///Users/wingkwong/Documents/GitHub/deno-playground/hello-world/app.ts\nDownload https://deno.land/std/http/server.ts\nWarning Implicitly using master branch https://deno.land/std/http/server.ts\nDownload https://deno.land/std/encoding/utf8.ts\nDownload https://deno.land/std/io/bufio.ts\nDownload https://deno.land/std/testing/asserts.ts\nDownload https://deno.land/std/async/mod.ts\nDownload https://deno.land/std/http/_io.ts\nWarning Implicitly using master branch https://deno.land/std/encoding/utf8.ts\nWarning Implicitly using master branch https://deno.land/std/http/_io.ts\nWarning Implicitly using master branch https://deno.land/std/async/mod.ts\nWarning Implicitly using master branch https://deno.land/std/io/bufio.ts\nWarning Implicitly using master branch https://deno.land/std/testing/asserts.ts\nDownload https://deno.land/std/io/util.ts\nWarning Implicitly using master branch https://deno.land/std/io/util.ts\nDownload https://deno.land/std/path/mod.ts\nWarning Implicitly using master branch https://deno.land/std/path/mod.ts\nDownload https://deno.land/std/path/win32.ts\nDownload https://deno.land/std/path/posix.ts\nDownload https://deno.land/std/path/common.ts\nDownload https://deno.land/std/path/separator.ts\nDownload https://deno.land/std/path/interface.ts\nDownload https://deno.land/std/path/glob.ts\nWarning Implicitly using master branch https://deno.land/std/path/win32.ts\nWarning Implicitly using master branch https://deno.land/std/path/posix.ts\nWarning Implicitly using master branch https://deno.land/std/path/common.ts\nWarning Implicitly using master branch https://deno.land/std/path/separator.ts\nWarning Implicitly using master branch https://deno.land/std/path/interface.ts\nWarning Implicitly using master branch https://deno.land/std/path/glob.ts\nDownload https://deno.land/std/path/_constants.ts\nDownload https://deno.land/std/path/_util.ts\nWarning Implicitly using master branch https://deno.land/std/path/_constants.ts\nWarning Implicitly using master branch https://deno.land/std/path/_util.ts\nDownload https://deno.land/std/fmt/colors.ts\nDownload https://deno.land/std/testing/diff.ts\nWarning Implicitly using master branch https://deno.land/std/fmt/colors.ts\nWarning Implicitly using master branch https://deno.land/std/testing/diff.ts\nDownload https://deno.land/std/path/_globrex.ts\nWarning Implicitly using master branch https://deno.land/std/path/_globrex.ts\nDownload https://deno.land/std/async/deferred.ts\nDownload https://deno.land/std/async/delay.ts\nDownload https://deno.land/std/async/mux_async_iterator.ts\nWarning Implicitly using master branch https://deno.land/std/async/deferred.ts\nWarning Implicitly using master branch https://deno.land/std/async/mux_async_iterator.ts\nWarning Implicitly using master branch https://deno.land/std/async/delay.ts\nDownload https://deno.land/std/textproto/mod.ts\nDownload https://deno.land/std/http/http_status.ts\nWarning Implicitly using master branch https://deno.land/std/textproto/mod.ts\nWarning Implicitly using master branch https://deno.land/std/http/http_status.ts\nDownload https://deno.land/std/bytes/mod.ts\nWarning Implicitly using master branch https://deno.land/std/bytes/mod.ts\nerror: Uncaught PermissionDenied: network access to \"0.0.0.0:8000\", run again with the --allow-net flag\n    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)\n    at Object.sendSync ($deno$/ops/dispatch_json.ts:72:10)\n    at Object.listen ($deno$/ops/net.ts:51:10)\n    at listen ($deno$/net.ts:152:22)\n    at serve (https://deno.land/std/http/server.ts:261:20)\n    at file:///Users/wingkwong/Documents/GitHub/deno-playground/hello-world/app.ts:2:11\n```\n\nHitting a permission denied problem is expected. It won't allow you to run in the browser on your system unless you explicitly allow it. To do that, we need to add an extra flag ``--allow-net``.\n\n```\ndeno run --allow-net app.ts\n```\n\n![image](https://user-images.githubusercontent.com/35857179/82280346-4abf2480-99c1-11ea-8e33-5bd039446304.png)\n\nOther flags allow Deno to unlock other functionality:\n\n- ``--allow-env`` allow environment access\n- ``--allow-hrtime`` allow high resolution time measurement\n- ``--allow-net=\u003callow-net\u003e`` allow network access\n- ``--allow-plugin`` allow loading plugins\n- ``--allow-read=\u003callow-read\u003e`` allow file system read access\n- ``--allow-run`` allow running subprocesses\n- ``--allow-write=\u003callow-write\u003e`` allow file system write access\n- ``--allow-all`` allow all permissions (same as ``-A``)\n\n## Formatting Code\n\nDeno provides ``deno fmt`` like Go to format your code.\n\n## For More\n\n- [Deno Official Website](https://deno.land)\n- [API Documentation](https://deno.land/typedoc/index.html)\n- [Awesome Deno](https://github.com/denolib/awesome-deno)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fdeno-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingkwong%2Fdeno-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fdeno-playground/lists"}