Skip to content

Commit

Permalink
clarify redirects and rewrites in README
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Aug 6, 2023
1 parent 757864a commit f31e6c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-adapter-netlify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Enables usage of Netlify Serverless runtimes for API routes and SSR pages.

This plugin adapts Greenwood [API routes](https://www.greenwoodjs.io/docs/api-routes/) and [SSR pages](https://www.greenwoodjs.io/docs/server-rendering/) into Netlify [Serverless functions](https://docs.netlify.com/functions/overview/) using their [custom build](https://docs.netlify.com/functions/deploy/?fn-language=js#custom-build-2) approach

In addition to generating the correct build output format for Netlify hosting, this plugin will automatically generate a __redirects_ file to correctly map your SSR page and API route URLs to the corresponding Netlify function (as a rewrite). You can continue to customize your Netlify project using your _netlify.toml_ file as needed.

> _**Note:** You can see a working example of this plugin [here](https://github.com/ProjectEvergreen/greenwood-demo-adapter-netlify)_.

Expand Down Expand Up @@ -61,8 +63,6 @@ export async function handler(request, context = {}) {
}
```

> **This plugin will then generate the appropriate __redirects_ file to correctly route SSR pages and API routes in Netlify as rewrites automatically. You can continue to customize your Netlify project using your _netlify.toml_ file as needed.**
## Netlify CLI / Local Development

This plugin comes with the Netlify CLI as a dependency to support some local development testing for previewing a Netlify build locally. Simply add a script like this to your _package.json_
Expand Down

0 comments on commit f31e6c2

Please sign in to comment.