# svelte-adapter-iis

> A SvelteKit Adapter for IIS Web Servers

Latest version **1.0.1** (published 2023-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install svelte-adapter-iis
pnpm add svelte-adapter-iis
yarn add svelte-adapter-iis
bun add svelte-adapter-iis
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-06-22 |
| First published | 2023-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Ethan P. Reker |
| Maintainers | abaga129 |

## Links

- npm: https://www.npmjs.com/package/svelte-adapter-iis
- Repository: https://github.com/abaga129/sveltekit-adapter-iis
- Homepage: https://github.com/abaga129/sveltekit-adapter-iis#readme
- Issues: https://github.com/abaga129/sveltekit-adapter-iis/issues
- npm.io page: https://npm.io/package/svelte-adapter-iis

## Recent versions

- 1.0.1 (latest) — 2023-06-22
- 1.0.0 — 2023-06-21

## README

# SvelteKit Adapter IIS

This package contains an adapter for Sveltekit that will make your project output deployable to IIS.

## Credit

I did not write the most important portion of this code that enables it to work with IIS. I merely used what another user had posted and turned it into an adapter that can easily be installed and used.

Proper credit goes to reddit user [jasonlyu123]("https://www.reddit.com/user/jasonlyu123/"). Thanks for being so helpful and sharing this with the community!

## Prerequisites

- IIS 7.0 or greater with `IISRewrite` module installed
- [iisnode]("https://github.com/Azure/iisnode") installed to server that runs IIS

## Usage

Install to your sveltekit project

```bash
yarn add sveltekit-adapter-iis

#or

npm i sveltekit-adapter-iis
```

In your `svelte.config.js` file replace default adapter with `IISAdapter`

```js
import { vitePreprocess } from '@sveltejs/kit/vite'
import IISAdapter from 'svelte-adapter-iis'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: vitePreprocess(),

  kit: {
    version: {
      pollInterval: 300000,
    },
    adapter: IISAdapter(),
  },
}

export default config
```

Build the project

```sh
yarn build

#or

npm run build
```

## How it works

This adapter simply creates a `web.config` file in the build output folder and then creates a `server.cjs` inside the server folder of your build output. The `web.config` rewrites incoming traffic to the `server.cjs` which is handled by iisnode.

---
_Source: https://npm.io/package/svelte-adapter-iis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
