changeset 1178:49cf706c326a

serve_for_nginx on port 8081
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 13 Feb 2018 22:44:06 -0700
parents 26533dd4cd09
children f9136432847e
files src/luan/modules/http/Server.luan src/luan/modules/http/serve_for_nginx.luan website/src/examples/hi.luan website/src/examples/hi2.luan website/src/examples/static.html website/src/examples/upload-and-email.luan
diffstat 6 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/http/Server.luan	Mon Feb 12 19:30:27 2018 -0700
+++ b/src/luan/modules/http/Server.luan	Tue Feb 13 22:44:06 2018 -0700
@@ -60,7 +60,9 @@
 			System.exit(-1)
 		end
 	}
+end
 
+function Server.start_rpc()
 	function Rpc.functions.call(domain,fn_name,...)
 		return Server.luan_handler.call_rpc(fn_name,...)
 	end
@@ -81,6 +83,7 @@
 	handler = LogHandler.new(handler)
 	Server.server = JavaServer.new(Server.port,handler)
 	start()
+	Server.start_rpc()
 end
 
 function Server.serve_for_nginx(dir)
--- a/src/luan/modules/http/serve_for_nginx.luan	Mon Feb 12 19:30:27 2018 -0700
+++ b/src/luan/modules/http/serve_for_nginx.luan	Tue Feb 13 22:44:06 2018 -0700
@@ -6,4 +6,5 @@
 	return
 end
 
+Server.port = 8081
 Server.serve_for_nginx(...)
--- a/website/src/examples/hi.luan	Mon Feb 12 19:30:27 2018 -0700
+++ b/website/src/examples/hi.luan	Tue Feb 13 22:44:06 2018 -0700
@@ -5,6 +5,7 @@
 return function()
 	Io.stdout = Http.response.text_writer()
 %>
+<!doctype html>
 <html>
 	<body>
 		Hello World
--- a/website/src/examples/hi2.luan	Mon Feb 12 19:30:27 2018 -0700
+++ b/website/src/examples/hi2.luan	Tue Feb 13 22:44:06 2018 -0700
@@ -4,6 +4,7 @@
 
 local function form()
 %>
+<!doctype html>
 <html>
 	<body>
 		<h1>Hello</h1>
--- a/website/src/examples/static.html	Mon Feb 12 19:30:27 2018 -0700
+++ b/website/src/examples/static.html	Tue Feb 13 22:44:06 2018 -0700
@@ -1,3 +1,4 @@
+<!doctype html>
 <html>
 	<body>
 		<h1>Static HTML</h1>
--- a/website/src/examples/upload-and-email.luan	Mon Feb 12 19:30:27 2018 -0700
+++ b/website/src/examples/upload-and-email.luan	Tue Feb 13 22:44:06 2018 -0700
@@ -12,6 +12,7 @@
 
 local function form()
 %>
+<!doctype html>
 <html>
 	<body>
 		<h1>Upload and Email</h1>
@@ -27,6 +28,7 @@
 
 local function sent()
 %>
+<!doctype html>
 <html>
 	<body>
 		<h1>Upload and Email</h1>