A very simple server for the Charge System built on Dart, Jaguar and dartis.
All the data manipulations are built on redis, so no heavy database is needed.
Install redis and start it on the background.
git clone [email protected]:AkatQuas/charge-system-demo.git
cd charge-system-demo/server
pub get
# change the port if you need another one
dart bin/server.dart [--port 8080]
This small server runs on http://localhost:8080
with only 4 API interfaces:
-
/api/login
: For login, possibleusername
,password
combination could be found here -
/api/choices
: For charge choices, get the available charge choices. -
/api/charge
: For charge, post the chargingvalue
to make a record of charge -
/api/history
: For histroy recap: get the charging history, look how much you have charged, no paging results for the sake of simplicity.