// main.js
import App from './App.vue'
import { createSSRApp } from 'vue'
import { createPinia } from 'pinia'
import GoEasy from 'goeasy'

const goeasyInstance = GoEasy.getInstance({
  host: "hangzhou.goeasy.io",
  appkey: "BC-7a962ba3e9b84034a96dcc703a177017",
  modules: ['im']
})

export function createApp() {
  const app = createSSRApp(App)
  const pinia = createPinia()

  app.config.globalProperties.$goeasy = goeasyInstance
  app.use(pinia)
  
  return { app, pinia }
}