With all the changes I've made to the config recently, I've been caught a few times by weird issues that were the result of not having updated the config on some projects. Example...
Old config:
sessions : true,
sessionTimeout : 20
New config:
sessions: {
enabled : true,
lifespan : 20
}
So I spent 10 minutes debugging an issue with sessions expiring that turned out to be a config issue.
There should be validation of the configuration on startup (both the config file and the config passed into app.server.start()) that checks for appropriate values. If something is wrong, provide direction and exit the process.
Checks to perform:
General type checks (strings are strings, numbers are numbers)
Verify the layout controller exists, should be easy once the controllers are parsed
Verify the template engine has been installed if it's anything other than template literals
With all the changes I've made to the config recently, I've been caught a few times by weird issues that were the result of not having updated the config on some projects. Example...
Old config:
New config:
So I spent 10 minutes debugging an issue with sessions expiring that turned out to be a config issue.
There should be validation of the configuration on startup (both the config file and the config passed into
app.server.start()
) that checks for appropriate values. If something is wrong, provide direction and exit the process.Checks to perform: