[!IMPORTANT]
It is with happy consideration, that sveltekit-zero-api is being deprecated in favor of SvelteKits Remote Functions which includes both networking improvements, taking advantage of SvelteKit's other features such as Transport Hooks and general best practices when writing clean code. This library is no longer in active development, and stands proud as an artifact from the past.Happy coding and may the
Svelte be with you!
npm i -D sveltekit-zero-api
/
pnpm add -D sveltekit-zero-api
// vite.config.ts
import { zeroAPI } from 'sveltekit-zero-api'
const config: UserConfig = {
plugins: [
sveltekit(),
zeroAPI()
]
}
// .gitignore
**/sveltekit-zero-api.d.ts
Zero API attempts to sow the gap between the frontend and backend. This includes typing backend response codes and their content and dealing with them effectively using callback functions. This may also include error handling.
Load
functionInstallation, usage and utility types can all be fond on the GitHub Wiki
Thank you ymzuiku for igniting the initial concept and codebase svelte-zero-api. And naturally, a big thanks to the Vite and Svelte family for the worlds best framework!💘