Now, let's create a new nodejs project directory:
- Install the stellar-sdk JavaScript module by executing the following command in the directory:
npm install --save stellar-sdk
- Create a new project file called CreateAccount.js and import the stellar-sdk, as follows:
const StellarSdk = require('stellar-sdk');
- Next, we'll define a new instance of the stellar-sdk that points to our local Horizon instance:
const server = new StellarSdk.Server('http://127.0.0.1:8000', {allowHttp: true}); const passphrase = 'Standalone Network ; February 2017'
- The passphrase only allows selected users to connect to our network. You can find the network passphrase by navigating to the Horizon landing page at localhost:8000 ...