Commit Graph

27 Commits

Author SHA1 Message Date
JayWll
302eadc7c3 Fixing syntax errors 2020-04-25 15:09:59 -06:00
JayWll
b2cafddf23 Move alert code to its own module 2020-04-25 15:07:01 -06:00
JayWll
61bb0066b0 Moved tweet functionality out to alert.js 2020-04-25 14:53:12 -06:00
JayWll
169c242e35 Created new module for alerts 2020-04-25 14:12:55 -06:00
JayWll
c462f805be Renamed db folder to src 2020-04-25 14:07:32 -06:00
JayWll
7612cb4fee Refactoring code for new reading
Removed code that runs after a new reading has been received from the 
express model, and added it as a sequelize hook instead.
2020-04-25 14:06:48 -06:00
JayWll
9c8b2d45c1 Minor change to wording of thank you tweet 2020-04-23 09:49:49 -06:00
JayWll
289141591e Randomizing wording of "thank you for watering me" tweet. 2020-04-20 10:39:40 -06:00
JayWll
9c30d07271 Updating alert threshold to four days 2020-04-17 17:29:27 -06:00
JayWll
fc2ad0014c Updating five day interval following testing. 2020-04-17 17:26:22 -06:00
JayWll
c6369f7795 Added posting to twitter when the plant needs water 2020-04-17 17:08:47 -06:00
Glitch (jasonsplant)
7ec5440bb5 Adding /showsettings endpoint to display settings table 2020-04-13 17:34:37 +00:00
JayWll
bbad48ee90 Added handlers to set flags when a new reading is received
- Reset the 'low' and 'alert' flags if the reading is greater than high-trigger
- Set the 'low' flag if it isn't set, and the reading is less than low-trigger
- Send an alert and set the 'alert' flag if the 'low' flag is more than 5 days old
2020-04-13 11:04:27 -06:00
JayWll
6d3e74aac9 Adding sync() commands to database scripts 2020-04-13 10:01:40 -06:00
JayWll
8832c658bf Script to initialize app settings table 2020-04-13 09:56:52 -06:00
JayWll
0f52429911 Adding table definition for settings. 2020-04-13 09:49:56 -06:00
JayWll
6f3a5c923e Disabling sequelize console logging 2020-04-11 13:34:59 -06:00
JayWll
ad6d6b79a4 Adding error checking to import utility 2020-04-11 13:34:32 -06:00
JayWll
0711674a79 Adjust all functions to use factored out database definition 2020-04-11 13:07:57 -06:00
JayWll
b5b49c5424 Adding dotenv to app.js to enable running in dev environment 2020-04-11 13:00:00 -06:00
JayWll
b64126a7fe Refactoring database and model definition into its own file 2020-04-11 12:57:35 -06:00
JayWll
555ae80afc Simplifying database connection options 2020-04-11 12:29:56 -06:00
JayWll
fcc89e75e6 Utility script to import data from production to development environment 2020-04-11 12:26:34 -06:00
JayWll
8b3a8b8c9b Adding fallback to port 4200 for development server 2020-04-11 12:10:24 -06:00
Glitch (jasonsplant)
bea81bc280 Adding export endpoint to move live data to dev environment 2020-04-10 17:51:31 +00:00
JayWll
4aaec6bd9b Cleaning up 2020-01-04 12:19:04 -07:00
JayWll
c8877d182a Moving nodeJS app files to nodeapp subfolder 2020-01-04 11:27:28 -07:00