Update readme.md

This commit is contained in:
Nate Moore 2022-04-06 10:27:16 -05:00 committed by GitHub
parent 29792649d2
commit ba90ef53d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,11 +5,12 @@ An experimental server-side rendering adapter for use with Node.js servers.
In your astro.config.mjs use:
```js
import { defineConfig } from 'astro/config';
import nodejs from '@astrojs/node';
export default {
export default defineConfig({
adapter: nodejs()
}
})
```
After performing a build there will be a `dist/server/entry.mjs` module that works like a middleware function. You can use with any framework that supports the Node `request` and `response` objects. For example, with Express you can do: