Subj : Couple of JS Questions
To : Digital Man
From : Apam
Date : Tue May 24 2022 09:54 am
-=> On Mon May 23 11:49:00 2022, Digital Man wrote to Apam <=-
> > First question, is it possible in synchronet javascript to determine the
> > mime-type of a file?
>
> You could load ctrl/mime_types.ini using the File class and compare the extension.
Great. That's what I'm now doing.
> > The second question, I'd like to add cgi type interface, which would load
> > javascript files from the gemini root. I'm unsure how to execute another
> > javascript file from within a service javascript file (or at all).
>
> load(), require() and js.exec() are used to execute a JS file from a JS file.
Thanks! I've not done this yet, but will soon.
If anyone is interested in looking at it, I put it up here:
https://github.com/apamment/geminiserv
Andrew
--
Andrew Pamment (apam)
=== TitanMail/linux v1.1.5
---
� Synchronet � The Positronic Brain