From 2d373cab5b77957b7efa8992b7a4eb51be5d48a2 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Thu, 4 Jul 2013 07:25:44 -0700 Subject: [PATCH] Updated Doc_Getting_Started (mediawiki) --- Doc_Getting_Started.mediawiki | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Doc_Getting_Started.mediawiki b/Doc_Getting_Started.mediawiki index 50579c63..d2692f4b 100644 --- a/Doc_Getting_Started.mediawiki +++ b/Doc_Getting_Started.mediawiki @@ -18,7 +18,40 @@ If you have another version of EiffelStudio than 7.2, you have to === Source code === The source code is available on Github. You can get it by running the command: -: git clone git://github.com/EiffelWebFramework/EWF.git +git clone git://github.com/EiffelWebFramework/EWF.git +== Hello World == +The hello world example is located in the directory $ISE_EIFFEL/contrib/examples/web/ewf/simple. Just double click on the simple.ecf file and select the simple target or if you prefer the command line, run the command: +estudio -config simple.ecf -target simple +Once the project is compiled, we will adapt the root class to point to port number 9090. +'''Note''': By default, the application listens on port 80, which is often already used by standard webservers (Apache, nginx, ...). Moreover, on Linux, ports below 1024 can only be opened by root. + +To do this, we will redefine the feature initialize as follows: + + +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 +end + + +After one more compile, you can now launch the application and point your browser to [http://localhost:9090]. +You should now see a simple page with Hello World. \ No newline at end of file