Remove console logs. Fix cors

This commit is contained in:
tenthirtyone 2017-08-10 21:35:55 -04:00
parent 68af224331
commit 4a0138b666
7 changed files with 18 additions and 17 deletions

View File

@ -33,3 +33,9 @@ Ctrl+D out of mongo
rm -rf ${bcoin-prefix-in-config.js}/chain.ldb
```
### Contributing
1. Fork
2. Branch
3. Send a PR

View File

@ -1,4 +1,9 @@
module.exports = function addressrouter(router) {
const Block = require('../../models/block.js');
const logger = require('../logger');
const MAX_BLOCKS = 200;
module.exports = function AddressAPI(router) {
router.get('/addr/:addr', (req, res) => {
res.send(req.params.addr);
});

View File

@ -3,9 +3,9 @@ const config = require('../../config');
const app = express();
const api = express.Router();
const CORS = require('./CORS');
const cors = require('./cors');
app.use(CORS);
app.use(cors);
// Serve insight ui front end from root dir public folder
app.use('/', express.static('./public'));

View File

@ -1,23 +1,15 @@
module.exports = function addressrouter(io) {
io.on('connection', (socket) => {
socket.on('subscribe', (data) => {
console.log('subscribe message');
console.log(data);
});
socket.on('message', (data) => {
console.log('unsubscribe message');
console.log(data);
});
socket.on('unsubscribe', (data) => {
console.log('unsubscribe message');
console.log(data);
});
socket.on('disconnect', (data) => {
console.log('unsubscribe message');
console.log(data);
});
});
};

View File

@ -39,7 +39,7 @@ function start() {
});
node.pool.on('peer', (peer) => {
// console.log(peer);
});
node.on('error', (err) => {
@ -48,7 +48,7 @@ function start() {
});
node.mempool.on('tx', (tx) => {
console.log(tx)
});
}

View File

@ -11,7 +11,7 @@ function parse(entry, txs) {
tx.outputs.forEach((output) => {
const outputJSON = output.toJSON();
//console.log(outputJSON);
/*
return new OutputModel({
address: outputJSON.address,
@ -22,7 +22,7 @@ function parse(entry, txs) {
tx.inputs.forEach((input) => {
const inputJSON = input.toJSON();
//console.log(inputJSON);
/* return new InputModel({
prevout: inputJSON.prevout,
script: inputJSON.script,

View File

@ -24,8 +24,6 @@ function parse(entry, txs) {
const valB = (tx.value || tx.valueOut.value || 0) / 1e8;
console.log(valB)
return sum + valB;
}, 0),
});