Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexmarqs/my-reminders-serverless-api
⏰ Personal reminders built with Vercel API Serverless Functions (Notion as CMS + Twilio)
https://github.com/alexmarqs/my-reminders-serverless-api
aws-lambda cron-jobs github-actions notion notion-api sentry serverless-functions twilio typescript vercel
Last synced: 25 days ago
JSON representation
⏰ Personal reminders built with Vercel API Serverless Functions (Notion as CMS + Twilio)
- Host: GitHub
- URL: https://github.com/alexmarqs/my-reminders-serverless-api
- Owner: alexmarqs
- License: mit
- Created: 2021-02-08T18:18:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-06T13:58:50.000Z (almost 3 years ago)
- Last Synced: 2024-04-26T01:34:45.307Z (8 months ago)
- Topics: aws-lambda, cron-jobs, github-actions, notion, notion-api, sentry, serverless-functions, twilio, typescript, vercel
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My reminders using Vercel API serverless functions ⏰ 🚀
[![Actions Status](https://github.com/alexmarqs/my-reminders-serverless-api/workflows/My%20reminders%20workflow/badge.svg)](https://github.com/alexmarqs/my-reminders-serverless-api/actions)
This repository contains some serverless functions that I'm using to periodically remind me about personal stuff. I'm deploying these functions with the cloud platform Vercel (internally they use the AWS to host functions as lambdas).
Available API endpoints:
- `api/reminders`: Read my personal reminders from **Notion** and send them by a **SMS (via Twilio)** to my phone number;
## Scheduled/cron job to call my API endpoints
There are multiple options for this. I can create my own scheduler job system, use one of the existing online cron services (easycron, cron-job.org, etc.) or use the main cloud providers (AWS, Google Cloud, Azure) that also have cron services available. However, in this case I'm using the **Github Actions** to create a scheduled job to invoke my API, check the folder `.github/workflows` for more details.
## Prerequisites
Install Vercel globally to be able to run the project and deploy it later.
```
npm install -g vercel
```The required environemnt variables (see `.env.example`) must be configured.
## Deployment
To replicate the Vercel deployment environment locally without requiring a deploy each time a change is made, execute:
```
vercel dev
```To test the cron jobs against the API serverless functions during the development I can use the [ngrok](https://ngrok.com/) in order to expose them to the world through my local machine.
To create a deployment for a production environemnt, execute:
```
vercel --prod
```