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

Adding more info for the first steps #1

Open
Goosie opened this issue Dec 4, 2019 · 0 comments
Open

Adding more info for the first steps #1

Goosie opened this issue Dec 4, 2019 · 0 comments

Comments

@Goosie
Copy link

Goosie commented Dec 4, 2019

I think it would be helpfull to add a little bit more lines into the code lines what need to run a nodejs script.

The complete set of lines you need to run the script in an app.js are:

const fetch = require('node-fetch');
const { link } = require('@blockmason/link-sdk');

const project = link({
clientId: 'ADD YOUR CLIENT ID HERE',
clientSecret: 'ADD YOUR SECRET ID HERE'
}, {
fetch
});

async function getMessage(){
const { message } = await project.get('/helloWorld', {
message: 'Hello, world!'
});
console.log(message);
}

getMessage();

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

1 participant