microstudio
microstudio copied to clipboard
Feature/prepare for heroku
Heroku and possibly some other easy-to-host services expect package.json to be in the root folder. Additionally, Heroku expects the app to listen on the port it provides in PORT environment variable.
This pull request includes:
- adding a new
package.jsonfile in the root withstartand other scripts calling the corresponding scripts from the actualpackage.json - moving CoffeScript out of dev dependencies, so that Heroku can compile
.coffeefiles before starting the app - loading port number from
process.env.PORTif possible - logging used port number to make it easy to troubleshoot port-related issues
At first I considered moving actually used package.json file from server to the root, but I wasn't sure if there were some important reasons to not have it in the root. It required to update file paths in at least one file, where some node modules were linked as static files on the frontend, as the node_modules folder would be in the root. In the end I thought it will be safer for now to just add a new file instead of using exising one.