brainy-server
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -14,3 +14,3 @@ require([ | ||
http: { | ||
port: 80 | ||
port: 8000 | ||
}, | ||
@@ -20,3 +20,4 @@ | ||
src: process.cwd(), | ||
resources: null | ||
js: 'js', | ||
resources: 'js/resources' | ||
}, | ||
@@ -36,2 +37,3 @@ | ||
src = path_conf.src, | ||
js = path_conf.js, | ||
resources = path_conf.resources, | ||
@@ -43,5 +45,12 @@ port = http_conf.port; | ||
app.listen(port); | ||
}; | ||
}; | ||
console.log(resources); | ||
// assume all modules we load from now on | ||
// are in project-land (this allows resources to resolve dependencies | ||
// relative to the project src) ... (removing the /#{js} will allow loading | ||
// relative to the file, but not relative to the src dir.. dunno how to get both) | ||
require.config({ | ||
baseUrl: src + '/' + js | ||
}); | ||
if (resources) { | ||
@@ -48,0 +57,0 @@ file.walk(resources, function(n, p, d, files) { |
@@ -7,3 +7,3 @@ { | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "./src/index", | ||
@@ -16,5 +16,4 @@ "bin": { | ||
"backbone": "0.9.10", | ||
"brainy-api": "0.0.1", | ||
"brainy-boilerplate": "0.0.1", | ||
"brainy-sync": "0.0.1", | ||
"brainy-api": "0.0.2", | ||
"brainy-sync": "0.0.2", | ||
"express": "3.1.0", | ||
@@ -24,2 +23,3 @@ "file": "0.2.1", | ||
"requirejs": "2.1.4", | ||
"socket.io": "0.9.13", | ||
"underscore": "1.4.4" | ||
@@ -26,0 +26,0 @@ }, |
define([ | ||
'http', | ||
'socket.io', | ||
'express', | ||
@@ -6,8 +8,12 @@ 'backbone', | ||
'brainy-api', | ||
//'brainy-subscribe', | ||
//'brainy-subscribe-api', | ||
'module', | ||
'path' | ||
], function(express, Backbone, Sync, Api, module, path) { | ||
], function(http, socketio, express, Backbone, Sync, Api, /*Subscribe, SubscribeApi,*/ module, path) { | ||
return function(src_dir, db_conf, resources) { | ||
var app = express(), | ||
server = http.createServer(app), | ||
io = socketio.listen(server), | ||
filename = module.uri, | ||
@@ -19,3 +25,2 @@ dirname = path.dirname(filename), | ||
app.use(express.static(src_dir)); | ||
app.use(express.static(node_modules + '/brainy-boilerplate/src')); | ||
@@ -28,5 +33,13 @@ // MongoDB Backbone persistence | ||
return app; | ||
// MongoDB subscription data | ||
//Backbone.subscribe = Subscribe(db_conf); | ||
//Backbone.Model.prototype.subscribe = Backbone.subscribe; | ||
//Backbone.Collection.prototype.subscribe = Backbone.subscribe; | ||
// create WS endpoints | ||
//SubscribeApi(io, resources); | ||
return server; | ||
}; | ||
}); |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
4404
83
3
+ Addedsocket.io@0.9.13
+ Addedactive-x-obfuscator@0.0.1(transitive)
+ Addedbase64id@0.1.0(transitive)
+ Addedbrainy-api@0.0.2(transitive)
+ Addedbrainy-sync@0.0.2(transitive)
+ Addedcommander@2.1.0(transitive)
+ Addednan@1.0.0(transitive)
+ Addedoptions@0.0.6(transitive)
+ Addedpolicyfile@0.0.4(transitive)
+ Addedredis@0.7.3(transitive)
+ Addedsocket.io@0.9.13(transitive)
+ Addedsocket.io-client@0.9.11(transitive)
+ Addedtinycolor@0.0.1(transitive)
+ Addeduglify-js@1.2.5(transitive)
+ Addedws@0.4.32(transitive)
+ Addedxmlhttprequest@1.4.2(transitive)
+ Addedzeparser@0.0.5(transitive)
- Removedbrainy-boilerplate@0.0.1
- Removedbrainy-api@0.0.1(transitive)
- Removedbrainy-boilerplate@0.0.1(transitive)
Updatedbrainy-api@0.0.2
Updatedbrainy-sync@0.0.2