This is a simple Serverless project with a single AWS Lambda function to scrap daily lunch menus and post them to a slack channel.
-
Fork this repository
-
cd
into project directory and install node modules:
npm install
-
Set up an incoming webhook in Slack, copy
.env.example
file to.env
and insert your Slack incoming webhook url there. (You'll see that the webhook is separated into 2 env variabes, this is because of testing.) -
Customize which websites should be scraped for their daily menus in
config/default.yml
-
Post a menu summary to your slack channel by running:
node run.js
Although you can run the lunch hunter locally on your machine or on any server with node.js and a cron job, this project is meant to be run as a Lambda function on AWS and deployed through the serverless framework.
-
Setup your AWS Credentials
-
Install Serverless.js
npm install -g serverless
- Deploy with Serverless
serverless deploy
For testing purposes the main Lambda function can be triggered via API Gateway ( GET /notify ) as well as a schedule event (you can change the specific time in serverless.yml
).
Memory size limit is set to the lowest value of 128MB.
Feel free to fork this project and write your own parser or api client for your favourite cantine or restaurant website.
This project is based on code and ideas from