{"id":15802110,"url":"https://github.com/juliencrn/test-deploy-node-app","last_synced_at":"2026-04-29T09:03:49.384Z","repository":{"id":103766537,"uuid":"512943486","full_name":"juliencrn/test-deploy-node-app","owner":"juliencrn","description":"Test how deploy and monitor nodejs bot using pm2","archived":false,"fork":false,"pushed_at":"2022-07-17T17:47:11.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T01:04:41.743Z","etag":null,"topics":["bot","devops","digitalocean","nodejs","pm2","telegram-bot","trading-bot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliencrn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-12T00:06:45.000Z","updated_at":"2023-03-08T22:20:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"cead8a52-e536-4bd9-b4b9-39975c2411b2","html_url":"https://github.com/juliencrn/test-deploy-node-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juliencrn/test-deploy-node-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliencrn%2Ftest-deploy-node-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliencrn%2Ftest-deploy-node-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliencrn%2Ftest-deploy-node-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliencrn%2Ftest-deploy-node-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliencrn","download_url":"https://codeload.github.com/juliencrn/test-deploy-node-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliencrn%2Ftest-deploy-node-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32418176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","devops","digitalocean","nodejs","pm2","telegram-bot","trading-bot"],"created_at":"2024-10-05T01:42:06.782Z","updated_at":"2026-04-29T09:03:49.367Z","avatar_url":"https://github.com/juliencrn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to deploy a nodejs app in a DigitalOcean droplet?\n\n- `ecosystem.config.js`: PM2 monitoring config\n- `index.js`: Nodejs Express web app that says \"Hello World\"\n- `setup.sh`: Executable that copy and launch the install script in the droplet using SSH\n- `install.sh`: Install the dependencies on the server\n\n## Deploy\n\n```sh\n# go in the project dir\ncd ../path/to/this/folder\n\n# make the script executable\nchmod +x ./setup.sh\n\n# Deploy\n./setup.sh {droplet_ip}\n# eg: ./setup.sh 157.245.78.51\n```\n\n## Managing\n\nRunning new bots in the same droplet and monitor it could be done using [pm2](https://pm2.keymetrics.io/docs/usage/quick-start/) (ready to use in the droplet console).\n\nThe bot is build to work with the `--no-autorestart` flag. Indeed, in case of minor issues, we just send a error message then try the next step.\nBut in case of major error, could be come with automatized trading bots, we want to completely stop the bot.\n\n```sh\n# Example commands:\n# start a bot\npm2 start index.js --name bot --no-autorestart\n    # Options\n    # on dev: --watch, // restart on file change\n\n\n# monitoring\npm2 monit\n\n# stop/delete\npm2 stop bot\npm2 delete bot\n```\n\n## Alert\n\nAlert could be sent using a telegram bot. It was created using [BotFather](https://t.me/BotFather).\n\nIt requires a `TELEGRAM_BOT_TOKEN` (via BotFather) and a `TELEGRAM_BOT_CHAT_ID` (from https://api.telegram.org/bo{token}/getUpdates['results'][0]['chat']['id']).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliencrn%2Ftest-deploy-node-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliencrn%2Ftest-deploy-node-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliencrn%2Ftest-deploy-node-app/lists"}