Global introduction of parse in Vue project

How to introduce parse into Vue project globally?

I Install Parse using NPM or Yarn

import Parse from 'parse'
Parse.initialize("YOUR_APP_ID");
Parse.serverURL = 'http://YOUR_PARSE_SERVER:1337/parse'
Vue.prototype.$Parse = Parse 

Then you can call

this.$Parse.find() 

Vue.prototype.$Parse Sets Parse to a global variable - alternatively you can just import Parse whenever you need it, Parse.User.current() etc will be stored across the platform.

1 Like