Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Created May 13, 2021 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DougAnderson444/6973cb8300e312bbf4cacfa6d0692652 to your computer and use it in GitHub Desktop.
Save DougAnderson444/6973cb8300e312bbf4cacfa6d0692652 to your computer and use it in GitHub Desktop.
Insert server rpc methods into svelte app
import App from "./App.svelte";
import { remote } from "./remote-rpc.js"; // rpc methods are proxied here
const app = new App({
target: document.body,
props: { methods: remote }, // available as methods.getAnswer() becasue of this
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment