femto-webapp/src/initApp.ts
2025-05-20 11:47:16 +02:00

19 lines
649 B
TypeScript

import { initUser } from './app/user/user.ts'
import { setGlobal } from './app/femtoApp.ts'
import { PostsService } from './app/feed/posts/postsService.ts'
import { MediaService } from './app/media/mediaService.ts'
import { AuthService } from './app/auth/authService.ts'
import { initClient } from './app/api/client.ts'
export function initApp() {
setGlobal('version', import.meta.env.VITE_FEMTO_VERSION)
initUser()
const client = initClient()
const postService = new PostsService(client)
const mediaService = new MediaService(client)
const authService = new AuthService(client)
return { postService, mediaService, authService }
}