Skip to content

Instantly share code, notes, and snippets.

@abhiaiyer91
Last active Mar 27, 2021
Embed
What would you like to do?
export function useMoralis() {
// Moralis Initialization
let Moralis;
if (typeof window !== `undefined`) {
Moralis = require("moralis");
Moralis.initialize(process.env.GATSBY_MORALIS_APPLICATION_ID);
Moralis.serverURL = process.env.GATSBY_MORALIS_SERVER_ID;
}
return { Moralis };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment