Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/talaxy009/react-tweet-netlify


https://github.com/talaxy009/react-tweet-netlify

Last synced: about 1 month ago
JSON representation

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.