Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var app = express();
- var path = require('path');
- var multiChain = require('multichain-node')({
- port: 6790,
- host: '104.236.99.212',
- user: "multichainrpc",
- pass: {pw}
- });
- app.use(express.static(path.join(__dirname, 'public')));
- app.get('/', function(req, res, next){
- multiChain.getInfo((err, info) => {
- if(err){
- throw err;
- }
- console.log(info.chainname);
- });
- res.sendFile(path.join(__dirname + '/index.html'));
- })
- app.listen(3000, function(){
- console.log('Example app listening on port 3000!');
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement