Apam wrote to All <=-ãã Ap> I'm mucking around in JS, and am creating a gemini service forã Ap> synchronet. It serves files in /sbbs/text/gemini/ (not exactly hardã Ap> coded, i'm using system.text_dir + "gemini".)ãã <ears perked in Apam's direction>ããããã... Are there sections? Consider transitionsã--- MultiMail/DOS v0.52ã þ Synchronet þ .: realitycheckbbs.org :: scientia potentia est :.ã
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ã
On Mon May 23 11:49:00 2022, Digital Man wrote to Apam <=-ãã > load(), require() and js.exec() are used to execute a JS file from a JS file.ããI think I need to use js.exec.apply() so I can pass the query argument.. but can't seem to find any information on it..ããI see it's used in install-xtrnããvar result = js.exec.apply(nullã ,[js_file, item.startup_dir, {}].concat(js_args));ããbut unsure what that first null is.ããAndrewãã--ãAndrew Pamment (apam)ãã=== TitanMail/linux v1.1.5ãã---ã þ Synchronet þ The Positronic Brainã
Sysop: | Karloch |
---|---|
Location: | Madrid, Spain |
Users: | 54 |
Nodes: | 8 (0 / 8) |
Uptime: | 129:39:15 |
Calls: | 700 |
Files: | 17,895 |
D/L today: |
128 files (60,769K bytes) |
Messages: | 66,010 |