Created
February 15, 2012 03:05
-
-
Save mikekunze/1832810 to your computer and use it in GitHub Desktop.
Creating a bang.js application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CoreApplication = require '../lib/CoreApplication.coffee' | |
class ExampleApplication extends CoreApplication | |
__appName: 'example' | |
__appVersion: 1.0 | |
__appPath: __dirname | |
__controllers: [ '/example' ] | |
constructor: (cb) -> | |
super @, ()=> @loadControllers ()=> | |
@logger.logMessage '[Server][Example] - ExampleApplication is loaded' | |
cb() | |
@ | |
loadControllers: (cb) -> | |
@app.get "/example", (req, res) => | |
@settings.app = "example" | |
res.render "example", { | |
layout: "example.layout.jade" | |
title: "Example" | |
settings: @settings | |
} | |
cb() | |
module.exports = ExampleApplication |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment