
안녕하세요 가야태자(@talkit)입니다. 오늘은 eclipse 상에서 node js 코드를 실행해보려고 합니다.
https://steemit.com/kr/@minari/node-js-1-steem-js
정말 오래된 글인데 위의 글을 일단 참고 했습니다.
https://github.com/steemit/steem-js/tree/master/doc
얘도 참고 했습니다.
https://copycoding.tistory.com/25
그리고 얘도 참고 했습니다.
일단 코드를 작성 합니다.
저는 그냥 제아이디로 대체를 했습니다.
```
/**
* eclipse에서 node js steem.js 사용해보기
*/
var steem = require('steem');
steem.api.getAccounts(['talkit'], function(err, response) {
console.log(err,response);
}
);
```
음 그리고 그냥 test.js를 오른쪽 마우스 클릭하고, as node program 을 클릭 했습니다.
그런데 오류 납니다.

steem 라이버러리를 사용할 수 없다네요.
^^
예전에 nodejs에서는
```
npm install steem --save
```
이렇게 치면 해결이 가능했습니다.
그런데 eclipse에서는 package.json 파일을 더블클릭해서
```
,
"dependencies": {
"steem": "*"
}
```
얘를 package.json 파일에 추가 하십시오.

대충 이런 모습이 되었습니다.
package.json 파일에서 오른쪽 마우스 누르고 Run as 누르고 npm install 을 클릭하시면 뭔가 나오면서 설치를 진행합니다.
캡쳐를 못했지만
54개정도의 뭔가가 설치되었다고 이야기를 했습니다.
그런데 저는 steem 만 설치했는데 뭐가 저리 많이 실치 된건가요?
아마도 "*" 때문인것도 같습니다. ^^
그리고 다시
test.js를 오른쪽 마우스 클릭하고, Run as >> node program 으로 실행하면 됩니다.
```
C:\Program Files\nodejs\node.exe test.js
null [
{
id: 524555,
name: 'talkit',
owner: { weight_threshold: 1, account_auths: [], key_auths: [Array] },
active: { weight_threshold: 1, account_auths: [], key_auths: [Array] },
posting: { weight_threshold: 1, account_auths: [Array], key_auths: [Array] },
memo_key: 'STM6x2Lh1KaXaHn1Uvk3g4RMTkDJqmrZDyJRXdoRJQdcRymmKCLgv',
json_metadata: '{"profile":{"website":"http://talkit.tistory.com","name":"kayaepirnce","about":"저는 IT에 관심이 많습니다. / I interest in Information Technology.","location":"광명/KwangMyung, KyungGi-Do, ROK","dtube_pub":"24PQibynDR1p2jQ7Y9WKuQFP12B6Ebut9cz58AbG32sSL"}}',
posting_json_metadata: '{"profile":{"website":"http://talkit.tistory.com","name":"kayaepirnce","about":"저는 IT에 관심이 많습니다. / I interest in Information Technology.","location":"광명/KwangMyung, KyungGi-Do, ROK","dtube_pub":"24PQibynDR1p2jQ7Y9WKuQFP12B6Ebut9cz58AbG32sSL"}}',
proxy: 'asbear',
last_owner_update: '1970-01-01T00:00:00',
last_account_update: '2020-03-03T15:06:15',
created: '2017-12-24T12:48:30',
mined: false,
recovery_account: 'steem',
last_account_recovery: '1970-01-01T00:00:00',
reset_account: 'null',
comment_count: 0,
lifetime_vote_count: 0,
post_count: 3954,
can_vote: true,
voting_manabar: { current_mana: '1215498246484', last_update_time: 1588607796 },
downvote_manabar: { current_mana: '311573418450', last_update_time: 1588607796 },
voting_power: 9451,
balance: '7.347 STEEM',
savings_balance: '0.000 STEEM',
sbd_balance: '12.295 SBD',
sbd_seconds: '22310717298',
sbd_seconds_last_update: '2020-05-04T15:56:36',
sbd_last_interest_payment: '2020-04-09T23:27:51',
savings_sbd_balance: '0.000 SBD',
savings_sbd_seconds: '0',
savings_sbd_seconds_last_update: '2018-02-09T15:19:24',
savings_sbd_last_interest_payment: '2018-02-09T15:19:24',
savings_withdraw_requests: 0,
reward_sbd_balance: '0.000 SBD',
reward_steem_balance: '0.000 STEEM',
reward_vesting_balance: '42.981938 VESTS',
reward_vesting_steem: '0.022 STEEM',
vesting_shares: '1286448.367627 VESTS',
delegated_vesting_shares: '119543.043625 VESTS',
received_vesting_shares: '79388.349800 VESTS',
vesting_withdraw_rate: '0.000000 VESTS',
next_vesting_withdrawal: '1969-12-31T23:59:59',
withdrawn: 0,
to_withdraw: 0,
withdraw_routes: 0,
curation_rewards: 20195,
posting_rewards: 953963,
proxied_vsf_votes: [ 0, 0, 0, 0 ],
witnesses_voted_for: 0,
last_post: '2020-05-04T12:16:09',
last_root_post: '2020-05-04T12:16:09',
last_vote_time: '2020-05-04T12:19:30',
post_bandwidth: 0,
pending_claimed_accounts: 0,
vesting_balance: '0.000 STEEM',
reputation: '19929545962250',
transfer_history: [],
market_history: [],
post_history: [],
vote_history: [],
other_history: [],
witness_votes: [],
tags_usage: [],
guest_bloggers: []
}
]
```
오 제가 가지고 있는 정보들이 쫙 뿌려 집니다.
오늘은 여기까지 하고
또 시간 나는대로 진행해보겠습니다.
감사합니다.