Start listening.

Property definitions

nitcorn $ HTCPCServer :: run
	# Start listening.
	fun run do
		var vh = new VirtualHost("localhost:{port}")
		vh.routes.add new Route("/", new HTCPCPAction)
		var factory = new HttpFactory.and_libevent
		factory.config.virtual_hosts.add vh
		print "Nit4Coffee is now running at port: {port}"
		factory.run
	end
lib/nitcorn/examples/src/htcpcp_server.nit:90,2--98,4