One of the most exciting opportunities IMO that Deno opens up, compared to most traditional server-side frameworks, is the possibility for simple url-based live-reload workflows in production. I'd love to be able to develop backend services by pushing source code to some url as I develop, and then have the production instances of the service notified of the changes and reload themselves immediately for a super-tight…
This is a really old concept with interpreted languages, Capistrano in Ruby came out in 2006 for this sort of workflow: https://en.wikipedia.org/wiki/Capistrano_(software) 10 year old gist for this exact thing: https://gist.github.com/rchampourlier/1281506/a22148264c457ebb69259261f117548569be6bef Same exists in Node, using PM2 process monitor via rsync/ssh: https://pm2.keymetrics.io/docs/usage/deployment/ Run a comma…
Deno 1.14
91–100 of 111 posts
Re: Deno 1.14
#92One of the most exciting opportunities IMO that Deno opens up, compared to most traditional server-side frameworks, is the possibility for simple url-based live-reload workflows in production. I'd love to be able to develop backend services by pushing source code to some url as I develop, and then have the production instances of the service notified of the changes and reload themselves immediately for a super-tight…
This is a really old concept with interpreted languages, Capistrano in Ruby came out in 2006 for this sort of workflow: https://en.wikipedia.org/wiki/Capistrano_(software) 10 year old gist for this exact thing: https://gist.github.com/rchampourlier/1281506/a22148264c457ebb69259261f117548569be6bef Same exists in Node, using PM2 process monitor via rsync/ssh: https://pm2.keymetrics.io/docs/usage/deployment/ Run a comma…
Arguably a delineation like this is better, even if just a single flag separating the behavior in the server, since it allows production to not worry about some file copies/changes forcing lots of reloads that aren't needed, which isn't really a problem in most development environments.
Re: Deno 1.14
#93Earlier quoted context omitted.
Who doesn't love being removed even further from the platform they're running on?
One of Deno's value props is to have a tighter and more explicit trust model. And this is not a obscure need. There are cloud providers who let you run JS on a specialized and restricted API. However, there is nothing stopping you from using Node or integrating V8 and go wild with it! (In fact I would argue that this is a solid strategy for some types of projects, where you can get the best of both (static/dynamic) w…
Sounds rather obscure actually. Still somewhat confused why this would be useful in Deno. Looks like it's just a repeat of what happened with Java's SecurityManager, which is now being deprecated and removed.
Re: Deno 1.14
#94I tried out Deno last weekend for a fun little hack project (syncing a local Markdown file to a formatted Google Doc), and it was awesome. Writing TypeScript code for Deno feels a lot like writing Go (which is a very good thing to me): - opinionated build/fmt/deps - well-designed stdlib - no need for scaffolding files (.eslintrc, babel.config.js, jest.config.js, mocha.opts, etc.) If that sounds good to you, try Deno!
I also tried it out recently, because I wanted to make a small utility for myself and liked the idea of it providing a single executable (and bypassing the node/NPM ecosystem for learning a JS/TS based system appealed to me). It delivered on that beautifully, as all I did is switch from running "deno run" as I was for testing to "deno compile" and it delivered to me exactly what I was looking for. A bit large at 57 M…
Re: Deno 1.14
#95Love Deno and using it as a node replacement. Fantastic work. I encourage anybody who has npm packages to move everything to deno.
I'm pretty happy with Node.js. What would be some good reasons to switch?
Re: Deno 1.14
#96https://github.com/denoland/deno/discussions/11771 > NodeJS compatibility, what is our high-level strategy, goals, next steps? > Do we see Node and Deno co-existing, or do we want to think of Node as "legacy"? (Note, there was no clear decision on this question, it was just a conversation) > If we could say "you can run your Express server under Deno faster than Node" would that encourage adoption? No clear answer I…
Node is from the days before ES6 and uses a different API. Should just kill it and start fresh. Deno conforms to modern JS standards and is much more pleasant to use in pretty much every way.
When you load a library you can load a newer version or an older one. It's up to you. You can use both.
Re: Deno 1.14
#97Only tangentially related, but what's the point of a static class block? What problem does it solve that's not covered by either the class constructor or a static const? Doesn't it introduce a weird (stateful!) computation that's hard to reason about? There's probably a use-case I'm missing, because intuitively I'd automatically classify it as bad a practice.
Another perspective on static blocks is what they replace/help migrate away from. Static blocks are one of the last pieces of the puzzle holding some projects (or at least some particularly old legacy objects in those projects) from migrating to the new class syntax. For better or worse the classic Constructor Function pattern of building objects in JS was full of static initialization code (as it was an easy thing t…
module.exports =
class MyClass
{ // ...
static init ()
{ // ... do something, like create and
// cache a Singleton etc.
return this;
}
} . init();
The static method init() is executed only once when the class is created and exported. You could add some check to it that causes an error if it gets called more than once.Do static blocks allow me to do something more?
Re: Deno 1.14
#98Re: Deno 1.14
#99Earlier quoted context omitted.
I also tried it out recently, because I wanted to make a small utility for myself and liked the idea of it providing a single executable (and bypassing the node/NPM ecosystem for learning a JS/TS based system appealed to me). It delivered on that beautifully, as all I did is switch from running "deno run" as I was for testing to "deno compile" and it delivered to me exactly what I was looking for. A bit large at 57 M…
Does the fact that you didn't need Npm mean that Deno has a suffciently large built-in library that a thing like Npm is in most cases not needed?
I found this article[1] which seems to indicate if the node packages use ES modules you can use import them as is, or if not it says JSPM can help with that.
1: https://medium.com/samsung-internet-dev/using-node-modules-i...
Re: Deno 1.14
#100One of the most exciting opportunities IMO that Deno opens up, compared to most traditional server-side frameworks, is the possibility for simple url-based live-reload workflows in production. I'd love to be able to develop backend services by pushing source code to some url as I develop, and then have the production instances of the service notified of the changes and reload themselves immediately for a super-tight…
I built this https://webcode.run/