Open linhai0212 opened 2 years ago
var Arweave = require('arweave');
var TestWeave = require('testweave-sdk');
...
/* GET home page. */
router.get('/', function (req, res, next) {
let arweave = Arweave.init({
host: '127.0.0.1',
port: 1984,
protocol: 'http',
timeout: 20000,
logging: false,
})
console.log("TestWeave", TestWeave);
TestWeave.init(arweave).then((aa) => {
console.log(aa)
})
res.render('index', {title: 'Express'});
});
@linhai0212 use like below for now v0.2.2
const { default: TestWeave } = require('testweave-sdk');
TypeError: TestWeave.init is not a function
error occurs when using express on express, how to solve it?