Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nurodev/astro-bun

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nurodev/astro-bun

An Astro adapter to deploy your SSR site to Bun targets

  • 1.1.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

astro-bun

This adapter allows Astro to deploy your SSR site to Bun targets.

Features

All functionality offered in astro-bun-adapter is also available in this project, along with some additional features:

  • Hybrid Output Support: You can now use "output": "hybrid" in your astro.config.mjs to output both static and server-rendered pages.
  • Improved server URL logging: The URL printed to the console when the server is started now shows the full URL rather than just the port.
  • Process exit & shutdown handlers: Added support for process.on handlers for when the server exists, or intercepts SIGINT and SIGTERM signals.

Usage

Installation

  1. Install the required dependencies
bun add @nurodev/astro-bun
  1. Add the integration to your astro config
+import bun from "@nurodev/astro-bun";

export default defineConfig({
+ 	adapter: bun(),
+ 	output: "hybrid",
});
  1. Update your package.json start script
{
	"scripts": {
-		"start": "astro dev"
+		"start": "bun run ./dist/server/entry.mjs"
	}
}

Contributing

This package is structured as a monorepo:

  • playground contains code for testing the package
  • package contains the actual package

Install dependencies using pnpm:

bun i --frozen-lockfile

Start the playground and package watcher:

bun dev

You can now edit files in package. Please note that making changes to those files may require restarting the playground dev server.

Licensing

MIT Licensed. Made with ❤️ by Ben Dixon.

Credits

  • @ido-pluto, and subsequently @andremralves: This project is massively based on astro-bun-adapter on but with some improvements added.
  • @florian-lefebvre: The structure & a lot of copy text is based on their astro-integration-template project template.

Keywords

FAQs

Package last updated on 06 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc