NDH
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
Also please see: https://github.com/orgsofthq/dsbuild
12 replies
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
12 replies
Deno application with just a Websocket connection gives 504 in Prod Deno Deploy
That is normal Deploy isolate operation. An isolate can be expected to stop at anytime usually around 5 or 6 minutes. They are not expected to last longer without an explicitly active connection; not the WebSocket that it initiated, but the connection that you made when you started it in Deploy. That initial connection is no longer active after you start it.
If you make a browser-app with an EventSource connection(SSE), the server will maintain the stream connection, and if not, this browser-app will reestablish the connection automatically. You would only need to run the app once as a starter/maintainer. Good-Luck!
If you make a browser-app with an EventSource connection(SSE), the server will maintain the stream connection, and if not, this browser-app will reestablish the connection automatically. You would only need to run the app once as a starter/maintainer. Good-Luck!
86 replies
Deno application with just a Websocket connection gives 504 in Prod Deno Deploy
You could setup an SSE connection from your client to the Deploy service. These tend to auto-reconnect the server (isolate) if it goes to sleep. This would work as long as you're not holding any state in the Deploy service. When the isolate drops, the client will auto-connect in a second or two. No pings required. I have some experience with this if you need.
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#closing_event_streams
That is, the client will auto-reconnect!
And, the docs also state: Below, the server should attempt to keep itself alive to deliver the stream!
And, if not, the client will attempt to auto-reconnect (continuously).
Deno -> server-side:
And, the docs also state: Below, the server should attempt to keep itself alive to deliver the stream!
And, if not, the client will attempt to auto-reconnect (continuously).
Deno -> server-side:
86 replies
Newbie question: Web development in Deno 2, and .ts to .js transpiling.
The reason I built
Hot does not require any deno.json, nor any package.json, and no node-modules folder. Hot creates its own config file on first use, and that is its only requirement.
The goal was to create an environment for quick development of vanilla HTML, CSS, JavaScript applications that leverage the joy of coding with Typescript.
Hot
, is that I don't care for all the bloat that a tool like Vite adds to your project.Hot does not require any deno.json, nor any package.json, and no node-modules folder. Hot creates its own config file on first use, and that is its only requirement.
The goal was to create an environment for quick development of vanilla HTML, CSS, JavaScript applications that leverage the joy of coding with Typescript.
5 replies
Newbie question: Web development in Deno 2, and .ts to .js transpiling.
I built my own dev server. Think Mini-Vite! Have a look:
https://jsr.io/@ndh/hot
5 replies
std JSON serializer/deserializer with Set and Map support
It would be very hard to beat the performance of native V8 JSON!
Native V8 JSON is extremely fast
See this in action : https://nhrones.github.io/Hot_BuenoCache/
NOTE: First use builds a test dataset in IndexedDB. Run more than once.
Repo at: https://github.com/nhrones/Hot_BuenoCache
6 replies
Without using a framework, how do I compile natively supported TS in Deno into static JS?
For a working example see:
https://nhrones.github.io/Hot_BuenoCache/
Click the see-the-code link on the bottom left of the page!
Or just go to the repo:
https://github.com/nhrones/Hot_BuenoCache
Or just go to the repo:
https://github.com/nhrones/Hot_BuenoCache
6 replies
Without using a framework, how do I compile natively supported TS in Deno into static JS?
You could try a simple util like https://jsr.io/@ndh/build
Or, even better; roll-your-own!
Create the following module -- builder.ts
Just modify the entrypoints and outfile to suit your needs.
You can also specify to bundle or not, and minification or not.
Add the above module to you project root. Then just to run:
deno run -A --quiet builder.tsYou could also add this as a task in deno.json called build.
6 replies
cannot publish package to jsr but it uses a shared file
There is a new Discord server for JSR
https://discord.gg/hMqvhAn9xG. Perhaps you could get help there.
https://discord.gg/hMqvhAn9xG. Perhaps you could get help there.
3 replies