Closed sudoskys closed 4 months ago
The recent update to the deployment script primarily involves the removal of initial testing setup commands for sender and receiver scripts. Additionally, the script has been enhanced to check for the presence of pm2
(a process manager for Node.js applications), and it installs or updates it as necessary. This modification streamlines the deployment process by focusing on essential installations and updates.
File | Summary of Changes |
---|---|
deploy.sh | Removed testing setup commands; added pm2 installation/update checks |
deploy.sh (1)
[style] 13-13: Consider using 'grep -c' instead of 'grep|wc -l'.
deploy.sh (3)
Line range hint `39-39`: Ensure that the `.env` file is properly configured before starting the application. It's crucial to verify that the `.env` file is correctly set up to avoid runtime errors. Consider adding a script or manual check to ensure that all necessary environment variables are correctly configured. --- Line range hint `47-51`: Check the installation and update logic for `pm2`. The script checks if `pm2` is installed and, if not, installs npm and `pm2`. This is a crucial update as per the PR objectives to ensure that the deployment process uses an up-to-date process manager. --- Line range hint `53-53`: Confirm that `pm2.json` is correctly configured and exists in the expected directory. Given that `pm2` is used to start the application, it's important to ensure that `pm2.json` is correctly set up and located in the correct directory. Consider adding a check to verify the presence and correctness of this configuration file before attempting to start the application.
Summary by CodeRabbit