data-transfer-test/app.rb

23 lines
366 B
Ruby
Raw Normal View History

2020-06-03 03:02:01 +00:00
require 'sinatra'
require 'sinatra/activerecord'
require 'chartkick'
require './models/rate'
set :database_file, 'config/database.yml'
Time.now.utc.localtime("-04:00")
get '/' do
@data = [
{
2020-06-05 00:59:19 +00:00
'name': 'Download Rate',
2020-06-03 03:02:01 +00:00
'data': Rate.get_download
},
{
2020-06-05 00:59:19 +00:00
'name': 'Upload Rate',
2020-06-03 03:02:01 +00:00
'data': Rate.get_upload
},
]
erb :home
end