Skip to content

Is there a way to use this library with import instead of require()? #1416

Closed Answered by intelliot
asimjb1200 asked this question in Q&A
Discussion options

You must be logged in to vote

@asimjb1200 the ripple object is only used for the browser build of this library. When using Node.js, instead try:

import {RippleAPI} from 'ripple-lib';
const api = new RippleAPI({
    server: 'wss://s1.ripple.com' // Public rippled server
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by intelliot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants