Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bitcoinapi = require('bitcoin-node-api');
- var express = require('express');
- var app = express();
- var port =3000;
- //Username and password relate to those set in the bitcoin.conf file
- var wallet = {
- host: 'localhost',
- port: 18332,
- user: 'test',
- pass: 'test123'
- };
- bitcoinapi.setWalletDetails(wallet);
- bitcoinapi.setAccess('default-safe'); //Access control
- app.use('/bitcoin/api', bitcoinapi.app); //Bind the middleware to any chosen url
- app.listen(3000);
- console.log('server is running at port ' +port);
Add Comment
Please, Sign In to add comment