samlam / sveltekit-adapter-dotnetcore

sveltekit adapter for dotnetcore web app configured with jering node.js
MIT License
15 stars 1 forks source link

sveltekit-adapter-dotnetcore

Adapter for SvelteKit apps that runs with standalone dotnetcore server, which requires jering-nodejs.

Usage

Install with npm i -D sveltekit-adapter-dotnetcore@next, then add the adapter to your svelte.config.js:

// svelte.config.js
import adapter from 'sveltekit-adapter-dotnetcore';

export default {
  kit: {
    adapter: adapter({
      // default options are shown
      out: 'build'
    })
  }
};

out parameter

The default output directory is set to build

dotnet sample app

pnpm install
pnpm -r build

The site is running on https://localhost:5005/

The about page is on http://localhost:3000/about

Dependencies

Please note the project is tested with node.js v16, which supports fetch.

It requires pnpm to be installed globally.

npm install -g pnpm

Next or TBD

Will improve aspnetcore Razor example

License

MIT