-import { database as db } from '../server/initializers/database'
-// import { hasFriends } from '../server/lib/friends'
-
-db.init(true)
- .then(() => {
- // FIXME: check if has followers
- // return hasFriends()
- return true
+import { CONFIG, initDatabaseModels } from '../server/initializers'
+import { ActorFollowModel } from '../server/models/activitypub/actor-follow'
+import { VideoModel } from '../server/models/video/video'
+import { ActorModel } from '../server/models/activitypub/actor'
+import {
+ getAccountActivityPubUrl,
+ getAnnounceActivityPubUrl,
+ getVideoActivityPubUrl, getVideoChannelActivityPubUrl,
+ getVideoCommentActivityPubUrl
+} from '../server/lib/activitypub'
+import { VideoShareModel } from '../server/models/video/video-share'
+import { VideoCommentModel } from '../server/models/video/video-comment'
+import { getServerActor } from '../server/helpers/utils'
+import { AccountModel } from '../server/models/account/account'
+import { VideoChannelModel } from '../server/models/video/video-channel'
+
+run()
+ .then(() => process.exit(0))
+ .catch(err => {
+ console.error(err)
+ process.exit(-1)