Instructions on how to run the application on port 9090 (#27)

This commit is contained in:
Olivier Ligot
2013-06-03 11:10:21 +02:00
parent 2e35f5519c
commit f78b8ec4a4
4 changed files with 208 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="css/lang-eiffel.css" rel="stylesheet">
</head>
<body>
<div class="container-narrow">
@@ -46,7 +47,34 @@
<p>The hello world example is located in the directory <i>$ISE_EIFFEL/contrib/examples/web/ewf/simple</i>.
Just double click on the <i>simple.ecf</i> file and select the <i>simple</i> target or if you prefer the command line, run the command:</p>
<pre><code>estudio -config simple.ecf -target simple</code></pre>
<p>Once the project is compiled, you can launch it and point your browser to <a href="http://localhost:9090">http://localhost:9090</a>.
<p>Once the project is compiled, we will adapt the root class to point to port number 9090.</p>
<div class="alert alert-info">
<strong>Note</strong>: 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.
</div>
<p>To do this, we will redefine the feature <i>initialize</i> as follows:</p>
<pre class="prettyprint lang-eiffel">
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
</pre>
<p>After one more compile, you can now launch the application and point your browser to <a href="http://localhost:9090">http://localhost:9090</a>.
You should now see a simple page with <i>Hello World</i>.</p>
</div>
</div>
@@ -57,5 +85,7 @@
</div> <!-- /container -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/run_prettify.js"></script>
<script src="js/lang-eiffel.js"></script>
</body>
</html>