question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

is browser supported?

See original GitHub issue

Hi, I just tried to build a browser app with the following code and I have an issue concerning blake2b-wasm wich uses node fs module.

var hyperdb = require('hyperdb')
var ram = require('random-access-memory')
var db = hyperdb(function (filename) {
     return ram()
   })

db.put('/hello', 'world', function (err) {
  if (err) throw err
  db.get('/hello', function (err, nodes) {
    if (err) throw err
    console.log('/hello --> ' + nodes[0].value)
  })
})

Is hyperdb working on browser?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
peacememoriescommented, Apr 6, 2018

Just mentioning this here in case anyone else is looking for this and has trouble finding it: In #96 random-access-idb is mentioned, in case persistent storage in the browser is needed. Seems to work quite well.

2reactions
hackergrrlcommented, Oct 23, 2017

How are you running this? Have you tried browserify?

$ npm i -g browserify
$ npm i hyperdb random-access-memory
$ cat > index.js
var hyperdb = require('hyperdb')
var ram = require('random-access-memory')
var db = hyperdb(function (filename) {
     return ram()
   })

db.put('/hello', 'world', function (err) {
  if (err) throw err
  db.get('/hello', function (err, nodes) {
    if (err) throw err
    console.log('/hello --> ' + nodes[0].value)
  })
})
^D
$ browserify index.js > bundle.js
$ cat > index.html
<script src="bundle.js"></script>
^D
$ chromium index.html  # or your js-supporting browser of choice

When I open the terminal I see /hello --> world.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
Sign in with a supported browser - Android - Google Support
Step 1. Use a supported browser. These and other browsers support JavaScript: Chrome; Safari; Firefox; Opera; Edge. Step 2 ...
Read more >
Supported browsers and platforms | nidirect
Recommended browsers · Google Chrome (latest version) — Windows, Mac OS X, iOS, Android · Apple Safari (latest version) — Mac OS X,...
Read more >
Supported browsers and platforms | Authentication
Compatibility. The Sign In With Google button works with the following browser and platform combinations: Browser / Platform, Android ...
Read more >
What is Browser Compatibility? (With Best Practices)
Browser compatibility, often known as cross-browser compatibility, refers to whether or not a website or web application functions as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found