symfio-contrib-express

Express plugin for Symfio.

symfio-contrib-express

Launch express application after all plugins is loaded.

symfio = require "symfio"
 
container = symfio "example"__dirname
container.set "port"80
 
loader = container.get "loader"
 
loader.use require "symfio-contrib-express"
 
loader.use (container, callback) ->
  app = container.get "app"
 
  app.get "/"(req, res) ->
    res.send "Hello World!"
 
loader.load()
  • app — Express application.
  • serverhttp.Server instance for express application.
  • express — Original express module.
  • port - Port for listening. Default value received from process.env.PORT. If process.env.PORT is undefined then default value is 3000.