Created
May 13, 2021 12:30
-
-
Save DougAnderson444/6973cb8300e312bbf4cacfa6d0692652 to your computer and use it in GitHub Desktop.
Insert server rpc methods into svelte app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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