diff --git a/src/index.ts b/src/index.ts index eb4ed7d..3cf1915 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,16 +21,17 @@ async function main() { }); const repository = new UnoptimizedInMemoryRepository(); - if (process.argv.length > 2 && process.argv[2] == "mocks") { + let notificationService: NotificationService; + if (process.argv.length > 2 && process.argv[2] == "integration-testing") { await loadTestData(repository); + notificationService = new NotificationService(repository, false); } else { const repositoryDataUpdater = new TimedApiBasedRepositoryLoader( repository ); await repositoryDataUpdater.start(); + notificationService = new NotificationService(repository); } - - const notificationService = new NotificationService(repository); notificationService.reloadAPNsTokenIfTimePassed(); const { url } = await startStandaloneServer(server, {