* Server.js include funnctions needed to perform backend tasks such as communicating with the sql-database.
* sql-database connected is 'prog2053-proj' on PORT 8081.
*
*
* Session is implemented and work (?), but not correctly.
* Session is implemented and work (?), but not correctly.
* When 8081 is accessed directly there is no problem saving and recieving the userId saved on req.session.userId, but when accessed from frontend (8080) the session is not accessible.
* When 8081 is accessed directly there is no problem saving and accessing the userId saved on req.session.userId, but when accessed from frontend (8080) the session is not accessible.
* The method we have chosen to use for implementing session was probably not the optimal and we dont know if it is an error with the implementation or a method not ment for this use.
* The method we have chosen to use for implementing session was probably not the optimal and we dont know if it is an error with the implementation or that the method is not meant for this kind of use.
* throughout the code we therefore have changed req.session.userId with 1, to simulate each function as logged in with user 1.
* throughout the code we therefore have changed req.session.userId with 1, to simulate each function as logged in with user "1".
* redirectLogin and redirectHome stillworks because it aparantly allow that req.session.userId is "undefined" insted of empty.
* redirectLogin and redirectHome stillworks because it aparantly allow that req.session.userId is "undefined" insted of empty.