HttpApp
The http layer's entry trait: the one an application on eezo-http alone extends.
object Main extends HttpApp {
override def routes: RouteTable = Routes.table()
}
The layer is declarative. The application names its routes, and every knob of the server is an override beside port; nothing in user code calls HttpServer.run. main is inherited from Dispatch: sbt run boots, eezo dev (the plugin's eezoDev, or sbt "run dev" without the restart on save) serves with the listing and the reload client on, eezo routes prints the table, and any other first argument is unknown. The database layer's commands do not exist here: an application that needs them depends on eezo and extends EezoApp, which stacks both layers.
serve is the only call site of HttpServer.run in the entry traits, so boot and dev see the same overrides. Both are virtual hooks the umbrella overrides: program to run boot under the database, devServer to run the drift check first.
Attributes
- Source
- HttpApp.scala
- Graph
-
- Supertypes
- Known subtypes
Members list
Value members
Abstract methods
The route table, usually Routes.table() from the sbt plugin's generated object. Abstract: an http layer is its routes, and an application without any is a mistake.
The route table, usually Routes.table() from the sbt plugin's generated object. Abstract: an http layer is its routes, and an application without any is a mistake.
Attributes
- Source
- HttpApp.scala
Concrete methods
The application. The default serves routes on port, which is what makes the minimal application one override and nothing else. Override it for anything more: background work, another setup, no server at all.
The application. The default serves routes on port, which is what makes the minimal application one override and nothing else. Override it for anything more: background work, another setup, no server at all.
Attributes
- Source
- HttpApp.scala
The commands this application answers, as first argument :: rest. Nil is program and is answered here, once, so no layer owns it. Each layer writes own orElse super.commands for its own commands, so the later mixin's arms are consulted first.
The commands this application answers, as first argument :: rest. Nil is program and is answered here, once, so no layer owns it. Each layer writes own orElse super.commands for its own commands, so the later mixin's arms are consulted first.
Attributes
- Definition Classes
- Source
- HttpApp.scala
What dev serves. The umbrella overrides it to run the drift check first and serve the drift page when the check blocks.
What dev serves. The umbrella overrides it to run the drift check first and serve the drift page when the check blocks.
Attributes
- Source
- HttpApp.scala
Routes the framework itself contributes, appended to whatever table serve is given so that every caller — boot's default, a user's own serve in an overridden boot, dev — serves them without knowing they exist. Empty here: eezo-live's LiveApp overrides it with the live socket and its client script, and EezoApp mixes that in. Appended, so the user's table keeps winning any path both name; they show in the boot listing (they are served, and the listing does not lie) but not in eezo routes, which is the user's table.
Routes the framework itself contributes, appended to whatever table serve is given so that every caller — boot's default, a user's own serve in an overridden boot, dev — serves them without knowing they exist. Empty here: eezo-live's LiveApp overrides it with the live socket and its client script, and EezoApp mixes that in. Appended, so the user's table keeps winning any path both name; they show in the boot listing (they are served, and the listing does not lie) but not in eezo routes, which is the user's table.
Attributes
- Source
- HttpApp.scala
The frame every HTML reply comes back in, the derived pages, the login page and the error page included. eezo's plain one unless the application names its own here, which is the one place a frame can be chosen, so that no route has to remember to ask for it.
The frame every HTML reply comes back in, the derived pages, the login page and the error page included. eezo's plain one unless the application names its own here, which is the one place a frame can be chosen, so that no route has to remember to ask for it.
Attributes
- Source
- HttpApp.scala
The request body cap, and the WebSocket text message cap with it.
Where boot's default and the dev command serve.
How the application's own failures are answered: a partial function from what a handler threw to the problem the client sees. What it does not cover, the boundary answers as 500.
How the application's own failures are answered: a partial function from what a handler threw to the problem the client sees. What it does not cover, the boundary answers as 500.
Attributes
- Source
- HttpApp.scala
What sbt run does on this layer alone: boot, under nothing. The umbrella overrides it to run the same boot under the database layer's lifecycle, the way it overrides devServer. No override here, deliberately: see Dispatch.program.
What sbt run does on this layer alone: boot, under nothing. The umbrella overrides it to run the same boot under the database layer's lifecycle, the way it overrides devServer. No override here, deliberately: see Dispatch.program.
Attributes
- Source
- HttpApp.scala
The key the session cookie is signed with. EEZO_SECRET by default. The sbt plugin's dev loop sets it to one secret per sbt session, so a restart on edit keeps the developer signed in. A run outside that loop with nothing set gets a throwaway announced at WARNING, so that hello runs with no configuration and a deployment that forgot is told. Read once, when serve boots.
The key the session cookie is signed with. EEZO_SECRET by default. The sbt plugin's dev loop sets it to one secret per sbt session, so a restart on edit keeps the developer signed in. A run outside that loop with nothing set gets a throwaway announced at WARNING, so that hello runs with no configuration and a deployment that forgot is told. Read once, when serve boots.
Attributes
- Source
- HttpApp.scala
The only caller of HttpServer.run: boots the server on this trait's overrides and blocks until it stops. dev turns the listing and the reload client on.
The only caller of HttpServer.run: boots the server on this trait's overrides and blocks until it stops. dev turns the listing and the reload client on.
Attributes
- Source
- HttpApp.scala
One row per command, for help. Each layer writes own ++ super.usage, and names only the spelling and the description: the columns are help's to lay out, once, over every layer's rows together, so no layer has to guess how wide the others' spellings are.
One row per command, for help. Each layer writes own ++ super.usage, and names only the spelling and the description: the columns are help's to lay out, once, over every layer's rows together, so no layer has to guess how wide the others' spellings are.
Attributes
- Definition Classes
- Source
- HttpApp.scala
Inherited methods
Attributes
- Inherited from:
- Dispatch
- Source
- Dispatch.scala