-import { database as db } from '../server/initializers/database'
-// import { hasFriends } from '../server/lib/friends'
-
-db.init(true)
- .then(() => {
- // FIXME: check if has following
- // return hasFriends()
- return true
+import { updateTorrentMetadata } from '@server/helpers/webtorrent'
+import { getServerActor } from '@server/models/application/application'
+import { WEBSERVER } from '../server/initializers/constants'
+import { initDatabaseModels } from '../server/initializers/database'
+import {
+ getLocalAccountActivityPubUrl,
+ getLocalVideoActivityPubUrl,
+ getLocalVideoAnnounceActivityPubUrl,
+ getLocalVideoChannelActivityPubUrl,
+ getLocalVideoCommentActivityPubUrl
+} from '../server/lib/activitypub/url'
+import { AccountModel } from '../server/models/account/account'
+import { ActorModel } from '../server/models/actor/actor'
+import { ActorFollowModel } from '../server/models/actor/actor-follow'
+import { VideoModel } from '../server/models/video/video'
+import { VideoChannelModel } from '../server/models/video/video-channel'
+import { VideoCommentModel } from '../server/models/video/video-comment'
+import { VideoShareModel } from '../server/models/video/video-share'
+
+run()
+ .then(() => process.exit(0))
+ .catch(err => {
+ console.error(err)
+ process.exit(-1)