https://github.com/danielwpz/bh-alert
In stock alert service for B&H photos.
https://github.com/danielwpz/bh-alert
Last synced: about 1 year ago
JSON representation
In stock alert service for B&H photos.
- Host: GitHub
- URL: https://github.com/danielwpz/bh-alert
- Owner: danielwpz
- License: gpl-3.0
- Created: 2018-03-16T20:12:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T00:28:58.000Z (about 8 years ago)
- Last Synced: 2025-02-16T01:13:33.558Z (over 1 year ago)
- Language: JavaScript
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bh-alert
In stock alert service for B&H photos.
## Description
The job of this service is really simple:
When given a list of product ids in B&H photos, it will check if those products are in stock or not.
- A REST API is published at `/products` to show the query results.
- And a cron job is also scheduled every minute to periodcally check the in stock status.
If the status changed, it will send out SMS notifications to all subscribers.
List of product IDs and subscriber phone numbers are configured in `config.js`
## Run
> To run it you'll need a stdlib token that has access to messagebird, which allows you to send SMS messages.
1. `npm i`
2. `STDLIB_TOKEN=YOUR_TOKEN npm run start`
## Deploy
> Make sure you have `docker`, `nomad`, `aws-cli` locally installed. And for AWS, you'll need a credential which has access to SQS deploy queue configured in `deploy.sh`
`npm version VERSION`