hifiveの使い方が分かるダッシュボードサンプルの紹介
hifiveを使って作られたWebアプリケーション(デモ)の紹介です。業務システムでよくあるダッシュボードのサンプルになります。
mpppk/hifive-dashboard-template: Dashboard sample constructed by hifive
利用技術
ダッシュボードサンプルは以下の技術を使って作られています。
- hifive
- Node.js
- TypeScript
- WebPack
使い方
まずGitリポジトリをクローンします。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/mpppk/hifive-dashboard-template.git | |
cd hifive-dashboard-template |
さらに npm で必要なライブラリをインストールします。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i |
後はWebサーバを立ち上げます。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm start |
これで http://localhost:8080 としてダッシュボードが立ち上がります。
機能
ダッシュボードサンプルは主に3つのパートに分かれています。
- アイコン表示
- 地図
- グラフ
すべてデータはリアルタイムに書き換えられるようになっています。表示して完了するダッシュボードではなく、表示したまま最新の情報が分かる仕組みです。
このコードを参考にすれば、高機能な管理者向けダッシュボード画面を作れるはずです。hifiveを使っていますのでメンテナンスしやすく、中長期的な運用にも耐えられるでしょう。
mpppk/hifive-dashboard-template: Dashboard sample constructed by hifive
コメントは受け付けていません。