This project show how to deploy hexoJS on Clever Cloud.
At the root of the project :
clever loginLog in the UI and close it. Then create your Python application and PostgreSQL add-on :
clever create --type node --region par HexoJS-appMore information on parameters HERE.
If needed, you can set the scaling :
clever scale --min-flavor pico --max-flavor pico
clever scale --min-instances 1 --max-instances 1More information on scaling HERE.
You need to setup one Environment variable :
clever env set CC_PRE_BUILD_HOOK "npm install hexo-cli -g"Optionally, if you want the command hexo genrate to be launched at every deployment to automatically generate the static file, you can also add :
clever env set CC_POST_BUILD_HOOK "hexo genrate"The hexoJS server launch is configured in the package.json in the scripts/start field.
This example is set to use the command :
hexo server --port 8080 --staticListening on port 8080 is necessary to deploy on Clever Cloud.
The --static option means only static page generated with hexo generate are shown. You can remove this option if you want.
Nothing else left to do, just go on and deploy your app :
clever deploy