ble-server/main-service.js

20 lines
453 B
JavaScript
Raw Normal View History

2017-08-09 10:15:07 +00:00
const bleno = require('bleno')
2017-08-10 01:24:14 +00:00
const config = require('./config.json')
2017-08-09 10:15:07 +00:00
const TimeCharacteristic = require('./time-characteristic')
const GdataCharacteristic = require('./gdata-characteristic')
class MainService extends bleno.PrimaryService {
constructor(){
super({
2017-08-10 01:24:14 +00:00
uuid: config.uuid.service.id,
2017-08-09 10:15:07 +00:00
characteristics: [
new TimeCharacteristic(),
new GdataCharacteristic()
]
})
}
}
2017-08-10 01:24:14 +00:00
module.exports = MainService