ZB, on Thursday, December 12, 2019 11:13 AM, wrote... > > On Thu, Dec 12, 2019 at 03:30:50PM +0000, Jose Isaias Cabrera wrote: > > > Old to MS DOS, but newbie to FreeDOS. Is there a webserver written and > run purely on FreeDOS? I have done a few searches, but don't see anything > in the various apps sites. Thanks. > > You can use TCL for DOS (I guess so):
I didn't know TLC was available for DOS... > #v+ > > proc Serve {chan addr port} { > fconfigure $chan -translation auto -buffering line > set line [gets $chan] > set path [file join . [string trimleft [lindex $line 1] /]] > if { [catch { set fl [open $path] } err] } { > puts $chan "HTTP/1.0 404 Not Found" > } else { > puts $chan "HTTP/1.0 200 OK" > puts $chan "Content-Type: text/html" > puts $chan "" > puts $chan [read $fl] > close $fl > } > close $chan > } > > set sk [socket -server Serve 5151] > vwait forever > > #v- > > A complete webserver. Works under Linux, didn't try it yet under DOS > control Yep. I use it too. Dr. Hipp, the inventor of SQLite has a nice setup with TLC. thanks. josé
_______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user