io.eezo

package io.eezo

Members list

Packages

package io.eezo.auth
package io.eezo.core
package io.eezo.db
package io.eezo.http
package io.eezo.live

Type members

Classlikes

trait EezoApp extends HttpApp, LiveApp, DbApp

The entry point an application on the umbrella extends: both layers, one trait, one package.

The entry point an application on the umbrella extends: both layers, one trait, one package.

object Main extends EezoApp {
 override def schema: Schema     = AppSchema
 override def routes: RouteTable = Routes.table()
}

Nothing here is new: HttpApp brings routes, the server's overrides, boot's default of serving, and the dev and routes commands; LiveApp brings the live socket and client, so Live.mount works with no configuration; DbApp brings schema, the database lifecycle, and the schema commands. boot is concrete in HttpApp and abstract in DbApp, so an application inherits "serve" regardless of which of the two supertypes below is written first, and a Main that overrides boot still wins.

What is this trait's own is the one idea both overrides spell: the http layer runs under the database. program is concrete in both layers, boot() in one and withDatabase(boot()) in the other, so the compiler refuses any trait that stacks the two until it overrides program and says which; this one says the database layer's. A user's own extends DbApp with HttpApp fails the same way, in either order, instead of booting with no Database installed. dev composes through devServer alike: the drift check before the server comes up, and the refusal page in place of the app while the drift is dangerous, all under the same Database.

Attributes

Source
EezoApp.scala
Supertypes
trait DbApp
trait DbInit
trait LiveApp
trait HttpApp
trait Dispatch
class Object
trait Matchable
class Any
Show all