Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aitthi/astro-surf
Astro Surf is a server side rendering library for Astro built with Axum
https://github.com/aitthi/astro-surf
astro napi-rs rust
Last synced: about 1 month ago
JSON representation
Astro Surf is a server side rendering library for Astro built with Axum
- Host: GitHub
- URL: https://github.com/aitthi/astro-surf
- Owner: Aitthi
- Created: 2023-07-22T07:08:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-30T11:59:28.000Z (6 months ago)
- Last Synced: 2024-10-10T09:06:07.934Z (about 1 month ago)
- Topics: astro, napi-rs, rust
- Language: Rust
- Homepage:
- Size: 915 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Surf
[![NPM version](https://img.shields.io/npm/v/astro-surf.svg?style=for-the-badge)](https://www.npmjs.com/package/astro-surf)
[Astro](https://astro.build/) Surf is a server side rendering library for Astro built with [Axum](https://github.com/tokio-rs/axum)
## Installation
```bash
npm install astro-surf
```
or
```bash
yarn add astro-surf
```## Usage
```js
import AstroSurf from "astro-surf";
import { handler as astroApp } from "./dist/server/entry.mjs";async function main() {
console.log('Starting app...');
process.env.NODE_ENV = 'production';
let app = AstroSurf.initialize(astroApp, {
client_path: `${process.cwd()}/dist/client`
});
await app.serve(3000)
}
main();```