diff options
author | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:28:28 +0200 |
---|---|---|
committer | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:28:28 +0200 |
commit | d003b82235a9329f912522a2f70aa950dfce4998 (patch) | |
tree | 888ce6b4132520bd9a19cd14324c8420b748876c | |
parent | 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 (diff) | |
download | LYLLRuoka-d003b82235a9329f912522a2f70aa950dfce4998.tar.gz LYLLRuoka-d003b82235a9329f912522a2f70aa950dfce4998.zip |
Updated README.md
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -118,6 +118,14 @@ const dbcredentials = await openFile("../dblogin.txt"); await updateDB.update("./shifts.txt", ["./Classes/oldclasses.txt", "./Classes/newclasses.txt"], dbcredentials); ``` +## Notifying of unusual food shifts (eg. during exams) +Currently the notifications have to be added manually to the MySQL database. Here's an example: +``` +USE lyllruoka; +INSERT INTO exams VALUES ('2021-11-22', '2021-11-30', '<h2>Koeviikko</h2><br>22.11. - 30.11..<br>Kouluruokaa on tarjolla 10:45-11:30.'); +``` +The first value in the parenthesis is the start date of the notification, the second the end date of the notification and the third value is the message to display. HTML is supported. The message will override the food shift search. + ## Updating the developer table Updating the developer table is pretty straightforward. You just need to provide the name of the developer, a description (eg. "Improved the performance of the server") and contact information: ``` @@ -130,6 +138,7 @@ You can make the server update itself from github. To make this work, move `~/Fo ``` mv ~/FoodJS/init.sh ~/init.sh ``` +> Note also that `init.sh` will update the server to `~/FoodJS`. If you want to keep the server somewhere elsewhere, you will have to modify the script a little bit. This script should run at reboot, so next up you will have to set up some cronjobs: To your crontab: |