1
0
Fork 0

Update server.js

This commit is contained in:
Lukas Bachschwell 2016-03-10 15:57:03 +01:00
parent b0f4e94a1d
commit 7accd22dc8
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ function startServer(route,handle,debug)
{
db('messages').size(); //call this once to establish the db if there is nothing in the json file
if(db('messages').size() == 0)db('messages').push({ numberString: "",number: "+43 681 2033 4015", time: "now", message: "SMS MessageBoard",color: 0 });
var mynumber = config('mainConfig').chain().find({ param: 'mynumber' }).value()['value'];
if(db('messages').size() == 0)db('messages').push({ numberString: "",number: mynumber, time: "now", message: "SMS MessageBoard",color: 0 });
// on request event
function onRequest(request, response) {