https://github.com/0nua/realty-bot
A telegram bot with notifications about new apartments from popular Hungarian sites: ingatlan.com, alberlet.hu, tappancsosotthon.hu
https://github.com/0nua/realty-bot
aws aws-lambda dynamodb express jest nodejs serverless-framework telegraf telegram-bot typescript
Last synced: 4 months ago
JSON representation
A telegram bot with notifications about new apartments from popular Hungarian sites: ingatlan.com, alberlet.hu, tappancsosotthon.hu
- Host: GitHub
- URL: https://github.com/0nua/realty-bot
- Owner: 0nua
- Created: 2023-02-08T17:51:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T09:05:36.000Z (over 2 years ago)
- Last Synced: 2026-03-02T19:40:38.944Z (4 months ago)
- Topics: aws, aws-lambda, dynamodb, express, jest, nodejs, serverless-framework, telegraf, telegram-bot, typescript
- Language: TypeScript
- Homepage: https://t.me/realty_notify_bot
- Size: 471 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
Awesome Lists containing this project
README
**How to run application locally?**
- Installing app: `npm run install-app`
- Starting app: `npm run start`
- Testing app: `npm run test`
- Deploying app: `npm run deploy`
For local configuration create `.env.offline`
Create `Test bot` via Telegram BotFather and use https://webhook.site/ for link with local instance.
Set webhook via GET request with param `link`: http://localhost:3002/offline/link?link=.
Note: https://webhook.site/ could proxy request from webhook url to your local instance. See: XHR Redirect option.
Note: chain of requests `Test Bot -> Webhook site -> http://localhost:3002/offline/webhook (local instance endpoint)`
**How to use dynamodb instance locally**
`npm run start` will startup offline lambda app with dynamodb instance.
For successful startup you need to install java on your machine.
`apt-get install openjdk-7-jre-headless`
For connecting to local instance use AWS CLI:
`aws dynamodb list-tables --endpoint-url http://localhost:8000`
`aws dynamodb scan --table=settings --endpoint-url http://localhost:8000`
Note 1: aws cli always ask you to set credetials and region, so you can use dummy values for localhost dynamodb
Note 2: http://localhost:8000/shell - was deprecated
Useful links:
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html
- https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html