Public | Automated Build

Last pushed: a month ago
Short Description
Power performance metrics for GNOME-Battery-Bench
Full Description
  • powergrid
    Power performance metrics for GNOME-Battery-Bench

Local development
*
Backend

#+BEGIN_SRC sh
cargo run

#+END_SRC

*** Frontend
Running and building

#+BEGIN_SRC sh

install dependencies

npm install

serve with hot reload at localhost:8080

npm run dev

build for production with minification [view the bundle analyzer report]

npm run build [--report]

#+END_SRC

Testing

#+BEGIN_SRC sh
npm run unit # run unit tests
npm run e2e # run e2e tests
npm test # run all tests

#+END_SRC
** Docker

#+BEGIN_SRC sh

#First time only, create a volume to make data persistent
sudo docker volume create --name powergrid-storage

#Build and run
sudo docker build -t powergrid .
sudo docker run -p 5000:5000 -v powergrid-storage:/data --name powergrid -d powergrid

#Stopping
sudo docker stop powergrid && sudo docker rm powergrid

#+END_SRC

** Uploading data

#+BEGIN_SRC sh
curl -H "Content-Type: application/json" -X POST http://localhost:5000/api/upload -d @<FILE>

#+END_SRC

Docker Pull Command
Owner
gicmo
Source Repository