map: {
"angular2": "npm:angular2@2.0.0-beta.3",
"es6-shim": "github:es-shims/es6-shim@0.34.2",
+ "fs": "github:jspm/nodelibs-fs@0.1.2",
"reflect-metadata": "npm:reflect-metadata@0.1.3",
"typescript": "npm:typescript@1.8.0",
"github:jspm/nodelibs-assert@0.1.0": {
},
"npm:asn1.js@4.4.0": {
"assert": "github:jspm/nodelibs-assert@0.1.0",
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"inherits": "npm:inherits@2.0.1",
"minimalistic-assert": "npm:minimalistic-assert@1.0.0",
"npm:assert@1.3.0": {
"util": "npm:util@0.10.3"
},
- "npm:bn.js@4.10.1": {
+ "npm:bn.js@4.10.3": {
"buffer": "github:jspm/nodelibs-buffer@0.1.0"
},
"npm:browserify-aes@1.0.6": {
"inherits": "npm:inherits@2.0.1"
},
"npm:browserify-rsa@4.0.0": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"constants": "github:jspm/nodelibs-constants@0.1.0",
"crypto": "github:jspm/nodelibs-crypto@0.1.0",
"randombytes": "npm:randombytes@2.0.2"
},
"npm:browserify-sign@4.0.0": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"browserify-rsa": "npm:browserify-rsa@4.0.0",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"create-hash": "npm:create-hash@1.1.2",
"buffer": "github:jspm/nodelibs-buffer@0.1.0"
},
"npm:create-ecdh@4.0.0": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"crypto": "github:jspm/nodelibs-crypto@0.1.0",
"elliptic": "npm:elliptic@6.2.3"
"minimalistic-assert": "npm:minimalistic-assert@1.0.0"
},
"npm:diffie-hellman@5.0.2": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"crypto": "github:jspm/nodelibs-crypto@0.1.0",
"miller-rabin": "npm:miller-rabin@4.0.0",
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
},
"npm:elliptic@6.2.3": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"brorand": "npm:brorand@1.0.5",
"hash.js": "npm:hash.js@1.0.3",
"inherits": "npm:inherits@2.0.1",
"util": "github:jspm/nodelibs-util@0.1.0"
},
"npm:miller-rabin@4.0.0": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"brorand": "npm:brorand@1.0.5"
},
"npm:parse-asn1@5.0.0": {
"assert": "github:jspm/nodelibs-assert@0.1.0"
},
"npm:public-encrypt@4.0.0": {
- "bn.js": "npm:bn.js@4.10.1",
+ "bn.js": "npm:bn.js@4.10.3",
"browserify-rsa": "npm:browserify-rsa@4.0.0",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"create-hash": "npm:create-hash@1.1.2",
--- /dev/null
+'use strinct';
+
+var currentDir = process.cwd();
+var express = require('express');
+var app = express();
+var port = 9000;
+var environment = process.env.NODE_ENV;
+var verbose = process.env.VERBOSE;
+
+// Back-end server for XHR requests:
+var serverPort = '8080';
+var serverName = 'localhost';
+
+
+switch (environment) {
+ default:
+ console.log('development mode');
+
+ app.use(express.static(currentDir + '/'));
+
+ // Deep linking (exclude XHR requests)
+ app.use('/((?!api)).*', express.static(currentDir + '/index.html'));
+ break;
+}
+
+app.listen(port, function() {
+ console.log('Express server listening on port ' + port);
+ console.log('env = ' + app.get('env') +
+ '\n __dirname = ' + __dirname +
+ '\n process.cwd = ' + currentDir);
+});