slidescript/examples/net-http.ss
2021-04-08 03:01:40 -07:00

21 lines
450 B
Scheme
Executable File

#!/usr/bin/slidescript
# SlideScript example, start a disposable http server
#
# Function nethttp "<portvalue>" "<forkvalue>"
# fork values:
# * 0 = do not fork to background
# * 1 = fork to background
# Daemonize port
port1=8081
# Forground port
port2=8080
# Daemonize, run in background
#nethttp "%port1%" "1"
# Run in foreground, Ctrl-C to exit ;)
nethttp "%port1%" "0"
print "Server on %port1% still running in the background"