Migrated most of the example and library to new design.

This commit is contained in:
2015-03-31 14:50:20 +02:00
parent 7d2ce8a77f
commit 4907bc3085
124 changed files with 2399 additions and 1789 deletions

View File

@@ -18,20 +18,13 @@ feature {NONE} -- Initialization
make
do
print ("Example: start a Nino web server on port " + port_number.out + ", %Nand reply Hello World for any request such as http://localhost:8123/%N")
(create {NINO_SERVICE}.make_custom (Current, "")).listen (port_number)
end
execute (req: WGI_REQUEST; res: WGI_RESPONSE)
do
res.set_status_code (200, Void)
res.put_header_text ("Content-Type: text/plain%R%N")
res.put_string ("Hello World!%N")
(create {NINO_SERVICE [HELLO_WORLD_EXECUTION]}.make_custom ("")).listen (port_number)
end
port_number: INTEGER = 8123
note
copyright: "2011-2012, Eiffel Software and others"
copyright: "2011-2015, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -0,0 +1,36 @@
note
description: "Summary description for {HELLO_WORLD_EXECUTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
HELLO_WORLD_EXECUTION
inherit
WGI_EXECUTION
create
make
feature {NONE} -- Initialization
execute
do
response.set_status_code (200, Void)
response.put_header_text ("Content-Type: text/plain%R%N")
response.put_string ("Hello World!%N")
end
note
copyright: "2011-2015, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end