mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
added temperature/humidity sensor
This commit is contained in:
11
models/temperature.js
Normal file
11
models/temperature.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var temperatureSchema = new mongoose.Schema({
|
||||
temperature: String,
|
||||
humidity: String,
|
||||
location: String,
|
||||
updated: {type: Date, default: Date.now}
|
||||
});
|
||||
|
||||
|
||||
mongoose.model('temperature', temperatureSchema);
|
||||
Reference in New Issue
Block a user