aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoel <joel.h.kronqvist@gmail.com>2021-12-19 16:53:49 +0200
committerjoel <joel.h.kronqvist@gmail.com>2021-12-19 16:53:49 +0200
commit58d5e12f4bcd3381cec96685abab0353e6ffaf63 (patch)
treee02d4dd0b4ea2f737d4826c5a6e76a043f55f9ff
parentfc48ff89c2015757ba9936795b34201156e38b9e (diff)
downloadLYLLRuoka-58d5e12f4bcd3381cec96685abab0353e6ffaf63.tar.gz
LYLLRuoka-58d5e12f4bcd3381cec96685abab0353e6ffaf63.zip
Server init & update
-rw-r--r--crontab_add.txt6
-rwxr-xr-xinit.sh4
-rw-r--r--server.js2
3 files changed, 11 insertions, 1 deletions
diff --git a/crontab_add.txt b/crontab_add.txt
new file mode 100644
index 0000000..5e7db63
--- /dev/null
+++ b/crontab_add.txt
@@ -0,0 +1,6 @@
+# these are probably going to need some fixing, for example the shutdown path may differ
+# to normal user:
+@reboot /home/USERNAME/FoodJS/init.sh
+
+# to root:
+0 0 * * 7 /sbin/shutdown -r now
diff --git a/init.sh b/init.sh
new file mode 100755
index 0000000..e3436b4
--- /dev/null
+++ b/init.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd /home/joel/FoodJS
+git clone "https://github.com/JoelHMikael/FoodJS.git" >> /tmp/test.txt
+node ./server.js
diff --git a/server.js b/server.js
index ba176ef..39c3a38 100644
--- a/server.js
+++ b/server.js
@@ -59,7 +59,7 @@ async function init()
}
// start server
- http.createServer(server).listen(80);
+ http.createServer(server).listen(8080);
}