Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/talaxy009/react-tweet-netlify
https://github.com/talaxy009/react-tweet-netlify
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/talaxy009/react-tweet-netlify
- Owner: Talaxy009
- Created: 2023-05-07T10:10:46.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-21T14:38:23.000Z (4 months ago)
- Last Synced: 2024-08-21T16:30:29.171Z (4 months ago)
- Language: TypeScript
- Size: 354 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-tweet-netlify
A [react-tweet](https://github.com/vercel-labs/react-tweet/) serverless function for Netlify.
Before deploy, set the environment variable `AWS_LAMBDA_JS_RUNTIME` to `nodejs18.x`.
After depoly, you can add a redircet role like this:
```txt
/api/* /.netlify/functions/:splat 200
```It will redirect `/api/tweet/123456` to `/.netlify/functions/tweet/123456`, so you can visit `/api/tweet/:id` to get tweet's data.