mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
change flag to integration-testing and update notification service construction
This commit is contained in:
@@ -21,16 +21,17 @@ async function main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const repository = new UnoptimizedInMemoryRepository();
|
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);
|
await loadTestData(repository);
|
||||||
|
notificationService = new NotificationService(repository, false);
|
||||||
} else {
|
} else {
|
||||||
const repositoryDataUpdater = new TimedApiBasedRepositoryLoader(
|
const repositoryDataUpdater = new TimedApiBasedRepositoryLoader(
|
||||||
repository
|
repository
|
||||||
);
|
);
|
||||||
await repositoryDataUpdater.start();
|
await repositoryDataUpdater.start();
|
||||||
|
notificationService = new NotificationService(repository);
|
||||||
}
|
}
|
||||||
|
|
||||||
const notificationService = new NotificationService(repository);
|
|
||||||
notificationService.reloadAPNsTokenIfTimePassed();
|
notificationService.reloadAPNsTokenIfTimePassed();
|
||||||
|
|
||||||
const { url } = await startStandaloneServer(server, {
|
const { url } = await startStandaloneServer(server, {
|
||||||
|
|||||||
Reference in New Issue
Block a user