added default config file

pull/5/head
Marian Oancea 10 years ago
parent f8ce292866
commit 1cf9d7bd57
  1. 0
      .node-xmlhttprequest-sync-99320
  2. 11
      app.js
  3. 16
      config/nodes.default.js
  4. 28
      config/nodes.js

@ -3,8 +3,17 @@ var path = require('path');
var favicon = require('serve-favicon'); var favicon = require('serve-favicon');
var logger = require('morgan'); var logger = require('morgan');
var bodyParser = require('body-parser'); var bodyParser = require('body-parser');
var fs = require('fs');
var config = require('./config/nodes'); var config;
if(fs.existsSync('./config/nodes.js')){
config = require('./config/nodes');
} else {
config = require('./config/nodes.default');
}
console.log(config);
// var config = require('./config/nodes');
var Node = require('./models/node'); var Node = require('./models/node');
var app = express(); var app = express();

@ -0,0 +1,16 @@
var nodes = [
// {
// name: 'Readable name of the node',
// type: 'C++/Go...',
// rpcHost: 'your node IP here',
// rpcPort: 'JSON-RPC port here'
// },
{
name: 'local',
type: 'C++',
rpcHost: 'localhost',
rpcPort: '8080'
}
];
module.exports = nodes;

@ -1,28 +0,0 @@
var nodes = [
{
name: 'instance 1',
type: 'C++',
rpcHost: '54.173.252.182',
rpcPort: '8080'
},
{
name: 'instance 2',
type: 'C++',
rpcHost: '54.209.133.248',
rpcPort: '8080'
},
{
name: 'instance 3',
type: 'C++',
rpcHost: '54.174.67.126',
rpcPort: '8080'
},
{
name: 'local',
type: 'C++',
rpcHost: 'localhost',
rpcPort: '8080'
}
];
module.exports = nodes;
Loading…
Cancel
Save