mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added serverside bootstrapping
This commit is contained in:
parent
2f430b15e0
commit
aa95c38cc2
1 changed files with 26 additions and 0 deletions
26
app.js
Executable file
26
app.js
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
var requirejs = require('requirejs');
|
||||||
|
|
||||||
|
var inspector = {};
|
||||||
|
|
||||||
|
requirejs.config({
|
||||||
|
nodeRequire: require,
|
||||||
|
baseUrl: 'lib'
|
||||||
|
});
|
||||||
|
|
||||||
|
var port = process.argv[2]
|
||||||
|
|| process.env.PORT
|
||||||
|
|| process.env.npm_package_config_port;
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
port: port,
|
||||||
|
rootDirectory: './',
|
||||||
|
caching: false,
|
||||||
|
logLevel: process.argv[3] || 0
|
||||||
|
};
|
||||||
|
|
||||||
|
requirejs(["Bootstrap/Server"], function(Server) {
|
||||||
|
var server = new Server(options);
|
||||||
|
inspector.server = server;
|
||||||
|
});
|
||||||
|
|
||||||
|
exports = module.exports = inspector;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue