Skip to content

Instantly share code, notes, and snippets.

@MBehtemam
Created February 25, 2014 06:15
Show Gist options
  • Save MBehtemam/9203687 to your computer and use it in GitHub Desktop.
Save MBehtemam/9203687 to your computer and use it in GitHub Desktop.
koa app
/**
* 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