Last active
November 9, 2017 14:58
-
-
Save WesTyler/7a44cfd1c509e979432d235527c23ec9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const plugin = { | |
register: async (server, options) => { | |
// Do your registration stuff | |
}, | |
name: 'pluginName', | |
version: '1.0.1', | |
once: true, | |
options: {} | |
}; | |
try { | |
await server.register(plugin); | |
} | |
catch (err) { | |
console.log('Deal with your registration error.'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately... I'm getting an error "SyntaxError: await is only valid in async function" with this code