Created
February 25, 2014 06:15
-
-
Save MBehtemam/9203687 to your computer and use it in GitHub Desktop.
koa app
This file contains 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
/** | |
* This is Base Application and other application mount on this App. | |
* Also this is Start-up App. | |
*/ | |
var koa = require('koa'), | |
fs = require('fs'), | |
views = require('koa-render'), | |
router = require('koa-route'), | |
hbs = require('koa-hbs'), | |
mount= require('koa-mount'), | |
path = require('path'), | |
serve = require('koa-static'), | |
AppConfing = JSON.parse(fs.readFileSync('./config/NAPConfig.json')), | |
App = koa(); | |
//Requiring Some App for mounting | |
var app = require('./Client/Applications/sandbox'); | |
App.use(mount('/app',app)); | |
App.listen(AppConfing.hostPort,AppConfing.hostIp,function(){ | |
console.log("App Listen ON " + AppConfing.hostIp + ":" + AppConfing.hostPort); | |
}); | |
App.listen(3000); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment