You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,29 @@ Library to integrate [eta](http://eta-lang.org) [wai](https://github.com/yesodwe
3
3
4
4
## Getting Started
5
5
* Visit the [Getting Started](http://eta-lang.org/docs/html/getting-started.html) eta instructions to build and install the library and the examples
6
-
* In app/Main.hs you can find some examples of wai applications and how to generate a servlet class that can be deployed in your favorite servlet container
6
+
* In [src/Network/Wai/Servlet/Examples.hs](https://github.com/jneira/wai-servlet/blob/master/src/Network/Wai/Servlet/Examples.hs) you can find some examples of wai applications and code to generate a servlet class that can be deployed in your favorite servlet container.
7
+
* There are two options to deploy wai-servlet apps: generating a war file to be deployed in a servlet container or run it directly in a embedded one; this is the way more similar to use [wai warp](https://github.com/yesodweb/wai/tree/master/warp) for haskell wai applications.
8
+
9
+
### Running an application in a embedded servlet container
10
+
11
+
* You need to install and set the [wai-servlet-jetty-adapter](http://github/jneira/wai-servlet-jetty-adapter) package as a dependency. Currently is the unique adapter implemented for wai-servlet.
12
+
* You have to import the module `Network.Wai.Servlet.Handler.Jetty` with the `run` function and call it with the port server and your application:
### Generating a war to be deployed in a servlet container
28
+
* This option supposes some manual steps. There is plans to make etlas build automatically a war file, tracked in [this issue](https://github.com/typelead/eta/issues/265).
7
29
* The main function to generate the servlet is `Network.Wai.Servlet.makeServiceMethod` for example:
0 commit comments