A tool to scrape the wegmans.com website and download receipt information for a given user.
- NodeJS >= 10.4.0
- NPM >= 6.1.0
- Docker (including Swarm, and Docker-Compose)
-
Clone this repository
git clone git@github.com:lapinski/web-scraper.wegmans.git
-
Install Dependencies
npm install
-
Start Postgres DB Image (or use any other Postgres Server)
docker stack deploy -c docker-compose.db.yml
-
Run DB Migrations (see note on TypeORM & Typescript)
npm run db:migrate
(see note on TypeORM & Typescript) Run the following command:
npm run db:generate -- "-n <EntityName>"
Where <EntityName>
is the exported class name of an entity
to generate a new migration from.
Typeorm loads JS files, so we need to build the TS files first,
and the paths for entities,migrations,etc used by the CLI
must target the dist/
folder.
The NPM scripts in this package are setup to build first, so
just execute the db:*
commands included.
This project uses Google Cloud Platform and Terraform.
-
Create project in GCP
-
Update project id in main.tf
-
Create GCP Service User In order to run the included terraform scripts, you must first setup the service user and then download the associated credentials (json key file).
-
Download keyfile
mv ~/Downloads/{{keyfile}}.json ~/.gcp/
-
Export ENV Variable with keyfile location
export GOOGLE_CLOUD_KEYFILE_JSON={{path}}
-
Run terraform
terraform apply