Files
EWF/examples/simple/application.e
Olivier Ligot 35729b4ab6 Use port number 9090 instead of 80
Port 80 is often already used by standard webservers (Apache, nginx, ...).
Moreover, on Linux, ports below 1024 can only be opened by root.
2013-05-27 09:15:12 +02:00

37 lines
661 B
Plaintext

note
description : "simple application root class"
date : "$Date$"
revision : "$Revision$"
class
APPLICATION
inherit
WSF_DEFAULT_SERVICE
redefine
initialize
end
create
make_and_launch
feature {NONE} -- Initialization
initialize
-- Initialize current service.
do
set_service_option ("port", 9090)
end
feature -- Basic operations
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
do
-- To send a response we need to setup, the status code and
-- the response headers.
res.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
res.put_string ("Hello World")
end
end