Subj : Couple of JS Questions
To   : All
From : Apam
Date : Mon May 23 2022 07:34 pm

Hi

I'm mucking around in JS, and am creating a gemini service for synchronet. It serves files in /sbbs/text/gemini/ (not exactly hard coded, i'm using system.text_dir + "gemini".)

First question, is it possible in synchronet javascript to determine the mime-type of a file?

At present I'm just using a switch statement based on the extension - is this the best way to do things?

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).

Andrew

---
� Synchronet � The Positronic Brain