updated to exclude the public directory which will be used to serve client side assets
added middleware config to serve static files from the public directory in the root of the project
removed unnecessary JSON.stringify call from getById for /thought route