This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Required modules | |
const ipfsAPI = require('ipfs-api'); | |
const express = require('express'); | |
const fs = require('fs'); | |
const app = express(); | |
//Connceting to the ipfs network via infura gateway | |
const ipfs = ipfsAPI('ipfs.infura.io', '5001', {protocol: 'https'}) | |
//Reading file from computer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const web3 = require('web3'); | |
const express = require('express'); | |
const Tx = require('ethereumjs-tx'); | |
const app = express(); | |
//Infura HttpProvider Endpoint | |
web3js = new web3(new web3.providers.HttpProvider("https://rinkeby.infura.io/YOUR_API_KEY")); | |
app.get('/sendtx',function(req,res){ |