mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
xrpl.js 2: update many mentions, more code
This commit is contained in:
14
content/_code-samples/get-started/js/base.js
Normal file
14
content/_code-samples/get-started/js/base.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Wrap code in an async function so we can use await
|
||||
async function main() {
|
||||
|
||||
// Define the network client
|
||||
const client = new xrpl.Client("https://s.altnet.rippletest.net:51234/")
|
||||
await client.connect()
|
||||
|
||||
// ... custom code goes here
|
||||
|
||||
// Disconnect when done so Node.js can end the process
|
||||
client.disconnect()
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user