Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
# Serve everything else with a standard `FileServer` with a root at "www/hello_world/"
vh.routes.add new Route(null, new FileServer("www/hello_world/"))
-# Avoid executing when running tests
-if "NIT_TESTING".environ == "true" then exit 0
-
var factory = new HttpFactory.and_libevent
factory.config.virtual_hosts.add vh
factory.run
import nitcorn
-# Avoid executing when running tests
-if "NIT_TESTING".environ == "true" then exit 0
-
# Create the virtualhost for your nitcorn server
var vh = new VirtualHost("localhost:8080")
# Serve everything with our restful action
vh.routes.add new Route(null, new MyAction)
-# Avoid executing when running tests
-if "NIT_TESTING".environ == "true" then exit 0
-
var factory = new HttpFactory.and_libevent
factory.config.virtual_hosts.add vh
factory.run