Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. var express = require('express');
  2. var app = express();
  3. var path = require('path');
  4.  
  5. var multiChain = require('multichain-node')({
  6. port: 6790,
  7. host: '104.236.99.212',
  8. user: "multichainrpc",
  9. pass: {pw}
  10. });
  11.  
  12. app.use(express.static(path.join(__dirname, 'public')));
  13.  
  14. app.get('/', function(req, res, next){
  15. multiChain.getInfo((err, info) => {
  16. if(err){
  17. throw err;
  18. }
  19. console.log(info.chainname);
  20. });
  21. res.sendFile(path.join(__dirname + '/index.html'));
  22. })
  23.  
  24. app.listen(3000, function(){
  25. console.log('Example app listening on port 3000!');
  26. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement