A framework for building Telegram bots with Telegram Commander (https://github.com/lewislun/telegram-commander).
- Node.js v20.11.1+
- MongoDB v8.0.3+
- change values in
package.json
name
- change values in
ecosystem.config.cjs
name
max_memory_restart
- change values in
.npmrc
tag-version-prefix
- remove these files:
app/testable.js
app/testable.test.js
- remove sample command in
app/index.js
- remove sample migration
migrations/20250125220301-sample-migration.js
- Configure secrets and variables in GitHub repository settings:
HOST
SSH_USERNAME
SSH_PRIVATE_KEY
DEPLOY_KEY
APP_PATH
- Configure
.github/workflows/ssh-deploy.yaml
- change
on.push.tags
to tag pattern that you want to deploy (e.g.v*
) - make sure
jobs.check-secrets.environment
andjobs.deploy.environment
is the same as the environment your GitHub Actions secrets are set for
- Create and push a new tag to trigger the deployment
- Install dependencies
npm install
- Create
config.yaml
fromconfig.template.yaml
and fill in the values
cp config.template.yaml config.yaml
- Run the app
npm run pm2:start # for production
npm run pm2:dev # for development
- Run tests
npm run test