Menu :: [[Doc_Getting_Started|Getting Started]] :: [[Doc_Community|Community]]

= Getting Started =
This page will help you to get started with EWF. We will first see how to install EWF and then how to compile and run the venerable Hello World example.

== Installation ==
=== EiffelStudio 7.2 ===
EWF is already included in EiffelStudio 7.2: you don't have to do anything in this case! This is the recommanded solution if you are a new developer or are new to Eiffel.

=== Other EiffelStudio versions ===
If you have another version of EiffelStudio than 7.2, you have to

* dowload EWF
* create a directory where you will put your custum Eiffel libraries
* extract EWF in the newly created directory
* define the environment variable EIFFEL_LIBRARY to point to the newly created directory

=== Source code ===
The source code is available on Github. You can get it by running the command:

<code>git clone git://github.com/EiffelWebFramework/EWF.git</code>

== 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:
<code>estudio -config simple.ecf -target simple</code>

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.