Deno v1 was released recently, created by Ryan Dahl who is known for the creator of Node. Will it replace the node?
Deno a new javascript runtime for the backend but now it’s written in Rust, not C++, in addition to that supports Typescript. The coolest thing about Deno is it doesn’t have heaviest node modules replaced by linking third-party snippets in code directly using its source like the web.
How secure is this?
Deno created by thinking the security most in mind. Like by default, no file, network, or environment access, unless explicitly enabled.
$ deno run — allow-read=/etc https://deno.land/std/examples/cat.ts /etc/passwd
$ deno run — allow-read=/etc myFile.ts
no more npm!
Most people prefer npm because it’s just like that, we can install and use third-party modules.
In Deno, the source of the repository should be imported to use it.
import { copy } from “https://deno.land/std@0.50.0/fs/copy.ts";
Rather you can import all third-party dependencies in a single file because package.json is no more here.
For the first time, Deno will download the modules and cache it.
$ deno run — allow-read — allow-write main.ts
Compile file:///dev/deno/main.ts
Download https://deno.land/std@0.50.0/fs/copy.ts
Download https://deno.land/std@0.50.0/fs/ensure_dir.ts
Download https://deno.land/std@0.50.0/fs/_util.ts
.
.
If you want to clear and download it again, you can run it with -- reload flag:
--reload
or update a specific package like this,
-- reload=https://deno.land/std/fs/copy.ts
Conclusion
As mentioned in the title, will it replace Node?
No. Deno is an idea in mind made by clearing all the flaws in Node. A huge community and large scale applications were built using Node.
May be from now, people will use it in their hobby projects and make it as an alternative to Node.
Top comments (0)