Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Charge System Server

A very simple server for the Charge System built on Dart, Jaguar and dartis.

Requirements

All the data manipulations are built on redis, so no heavy database is needed.

Install redis and start it on the background.

Usage

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]

Details

This small server runs on http://localhost:8080 with only 4 API interfaces:

  • /api/login: For login, possible username, password combination could be found here

  • /api/choices: For charge choices, get the available charge choices.

  • /api/charge: For charge, post the charging value 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.