javascript - Node.js connect to Baqend.com -
i trying connect first node.js app baqend.com
it should connect database , if connected write "connected baqend"
var http = require('http'); http.createserver(function (req, res) { res.writehead(200, {'content-type': 'text/plain'}); res.end('hello world\n'); }).listen(1337, '127.0.0.1'); console.log('server running @ http://127.0.0.1:1337/'); var db = require('baqend'); db.connect('my-app', true); db.ready(function(write) { write.send('connected baqend\n'); });
however gives error:
unhandledpromiserejectionwarning: unhandled promise rejection (rejection id: 1): typeerror: cannot create property 'tokenstorage' on string 'hello baqend
any appreciated :-)
Comments
Post a Comment