This Node.js script automates the daily entry to the contest here.
- Automated contest entries via HTTP POST requests to Evian website
- Email feedback for contest entries
-
Clone the repo and cd into the directory
-
Run
npm install
to install all of the project dependencies -
Rename the
config/emails.example.js
file toconfig/emails.js
and add your email(s) to the file -
Run
npm start
in order to test the script -
Install a new cronjob to run the script on a daily basis by typing the following:
$ crontab -e
-
Add the following line to run the script daily at 8:00am local time
0 8 * * * path/to/node path/to/evian-us-open-contest/index.js
Note: Ensure that
path/to/node
points to your local version of node -
If you're going to configure the SMTP server for email feedback: Rename the
config/server.example.js
file toconfig/server.js
and add your SMTP server details to the file. Also, ensure that you edit your configured cronjob and add the-e
flag to the script call in order to enable emails.