Steemit API資料を試してみる
こんにちは、@yasuです。
以前にも試したことがありますが、その時は、ブラウザ側で動かすjavascriptでした。今回は、VPSを借りたので、サーバー側で動かしてみたいと思います。
目的は、steemitを構成している仕組みを理解して、必要なツールなどを作成できるようになることです。
温かく見守っていてください^^
どんなスキルが必要なのかも知りません。
まずは、
Node.jsかな。
JavascriptとPythonなら聞いたことがありますね^^;
まずは、書いてある通りにやってみます。
JS: Getting Started
ダウンロード
git clone https://github.com/steemit/devportal-tutorials-js.git
カレントディレクトリの移動
cd devportal-tutorials-js/tutorials/01_blog_feed
インストール
npm i
実行
npm run dev-server
これも必要。3000ポートを開けます。
sudo ufw allow 3000/tcp
sudo ufw status
VPSは外部にあるので、ブラウザから、http://localhost:3000/ ではなく、 http://conoha:3000/ で試したが、アクセスできません。
conohaは、hostsに設定しています。
受付中のポートを確認します。
127.0.0.1で良いのか気になりますが、どうしたらいいのか分かりません。
ss -nltp
JS: Blog Feed
ここには、もう一つの起動方法が書いてあった。
違いが分かりません。
npm run start
受付中のポートを確認します。
ss -nltp
ブラウザから、http://conoha:3000/ でアクセスできた。
調べてみます。
package.jsonに起動方法の定義があった。
新たな疑問、webpack nodeは何だろう?
今回は、ここまでとします。
ありがとうございました。
いらすとや
steemit サインアップ
steemit 知識
日本語 Steemit Discord (超初心者~誰でも)
Vote for @yasu.witness !
私がSTEEMの成長を助け、Steemiansの成功と繁栄を助けることができると思いましたら、@yasu.witnessに30票の1つを与えてくださると嬉しいです。
Simply go to the Steemit Wallet Witness list, scroll to the bottom, and fill in the form:
Hi yasu!
npm run dev-serverstarts in debug mode; it's useful while developing your application as it will provide additional debug info.npm run startis for running in production mode; debugging functionality is turned off in order to maximise performance.In production mode, webpack bundles together all the scripts for efficiency, instead of keeping them separate.
http://conoha:3000/ will not work in development mode, because the application is not listening on the public IP.
However, in production mode, the file index.js gets run. You can see the line
app.listen(3000);. This is equivalent toapp.listen(3000, '0.0.0.0');which means that it will listen on ALL IP addresses.Hope this helps! 🙂
Thank you very much for your detailed explanation. And I understood that 0.0.0.0 is a special IP address.
@yasu さん、こんにちは。
tomoyan.witnessに投票お願いします👇
https://steemitwallet.com/~witnesses

💡 アップボートガイド 💡
分からない事は何でも質問して下さい🙇

