Updated readme
This commit is contained in:
parent
ff67cb4849
commit
8c65f13327
1 changed files with 7 additions and 29 deletions
|
@ -1,44 +1,22 @@
|
||||||
# @astrojs/netlify
|
# @astrojs/vercel
|
||||||
|
|
||||||
Deploy your server-side rendered (SSR) Astro app to [Netlify](https://www.netlify.com/).
|
Deploy your server-side rendered (SSR) Astro app to [Vercel](https://www.vercel.com/).
|
||||||
|
|
||||||
Use this adapter in your Astro configuration file:
|
Use this integration in your Astro configuration file:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
import netlify from '@astrojs/netlify/functions';
|
import vercel from '@astrojs/vercel';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
adapter: netlify()
|
integrations: [netlify()]
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
After you build your site the `netlify/` folder will contain [Netlify Functions](https://docs.netlify.com/functions/overview/) in the `netlify/functions/` folder.
|
After you build your site the `.output/` folder will contain your server-side rendered app. Since this feature is still in beta, you'll **need to add this Enviroment Variable to your Vercel project**: `ENABLE_FILE_SYSTEM_API=1`
|
||||||
|
|
||||||
Now you can deploy!
|
Now you can deploy!
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
netlify deploy
|
vercel
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
The output folder is configuration with the `dist` property when creating the adapter.
|
|
||||||
|
|
||||||
```js
|
|
||||||
import { defineConfig } from 'astro/config';
|
|
||||||
import netlify from '@astrojs/netlify/functions';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
adapter: netlify({
|
|
||||||
dist: new URL('./dist/', import.meta.url)
|
|
||||||
})
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
And then point to the dist in your `netlify.toml`:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[functions]
|
|
||||||
directory = "dist/functions"
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue