jradxl
Deno Add syntax?
I rather mucked up my example.. Was trying with Oak, which says:
Deno CLI and Deno Deploy
oak is available on both deno.land/x and JSR. To use from deno.land/x, import into a module:
I just wanted to know what the syntax is for things that are not in jsr or npm yet
10 replies
Deno import use for local files?
Dynamic Imports did work, but as I was focusing on simple CLIs, with a Shebang I just wondered if that would cause me issues later. Then, since localhost didn't work for me I rather focused on that, especially since @coty said it should. Now you've reminded me about dynamic imports, I'll have another go... Yes, I'm very impressed with Deno (v2!) and I can feel it's going to be a great alternative to Bash, once I get over the learning curve. I did try Deno years ago but the debugging in vscode didn't work then. Now it's amazing. Thanks.
11 replies
Deno import use for local files?
I've got it working. I've used Nginx and https, with a real ssl certificate but limited to within my own lan (using pihole as split dns. ie not public). And ensuring the published directory had a deno.json file. I'm not sure what bits caused it to work, but it certainly does now.
So my import statement is like:
import { wordCount } from "https://myhost.mydomain.dynu.XXX/mydeno/string-utils/mod.ts"
Thanks for answering
11 replies
Deno import use for local files?
curl -I http://localhost/mod.ts
HTTP/1.1 501 Not Implemented
Content-Type: text/plain
Content-Length: 22
Date: Mon, 30 Sep 2024 23:09:54 +0000
11 replies