Database using Firebase Real Time Database
Every user has their own unique ID provided by firebase (ex: "-LARdlvlVYAZd_HlbxSS")
{
"name": "Fadhil",
"email": "[email protected]",
"createdAt": "",
"updatedAt": ""
}
Every Treki has their own unique ID provided by firebase (ex: "-LARdlvlVYAZd_HlbxSS")
{
"name": "Wallet",
"device_id": "34:FE:3F:34:4D",
"image_url": "flickr.com/img348jjr4.jpg",
"user_id": "-LARdlvlVYAZd_HlbxSS",
"location": {
"accuracy": 5,
"latitude": 37.785834,
"longitude": -122.406417,
},
"status": true,
"createdAt": "",
"updatedAt": ""
}
Server runs on Node v9.11.1
$ npm install
$ npm start
GET /treki
POST /treki
GET /treki/:id
PUT /treki/:id
DELETE /treki/:id
PUT /treki/:id/location
PUT /treki/device_id/:device_id
GET /treki/user_id/:user_id
GET /users/
POST /users/
GET /users/:id
PUT /users/:id
DELETE /users/:id