Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser example : How to bundle the 'dgraph-js-http' lib in an HTML page #16

Closed
hubyhuby opened this issue Nov 11, 2019 · 2 comments
Closed

Comments

@hubyhuby
Copy link

hubyhuby commented Nov 11, 2019

http1.zip

There is an example for Node.js on server side that is working well.
https://github.com/dgraph-io/dgraph-js-http/tree/master/examples/simple

Now when you want to test it on the browser side the require directive is not reconised by the JS on the browser side. " const dgraph = require("dgraph-js-http"); " gives an error.

I manage to use a "bundler " and got to the next series of problems ;)
Could you please provide with an example ?

This worked a little :
browserify index-promise.js > bundle.js

@hubyhuby
Copy link
Author

image

@hubyhuby hubyhuby changed the title Example : How to bundle the 'dgraph-js-http' lib in an HTML page Browser example : How to bundle the 'dgraph-js-http' lib in an HTML page Nov 11, 2019
@paulftw
Copy link
Contributor

paulftw commented Nov 22, 2019

We have a detailed blog post on this topic: https://blog.dgraph.io/post/building-todo-list-react-dgraph/

@paulftw paulftw closed this as completed Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants