mirror of
https://github.com/standardnotes/server
synced 2026-01-16 20:04:32 -05:00
* fix(api-gateway): reduce exports * wip controllers * fix: imports of controllers * fix(api-gateway): rename http service interface to proxy interface * wip: self-registering services and controllers * wip: add registering controller method bindings and services in container * feat: merge two services together * wip: resolving endpoints to direct code calls * wip: bind controller container to a singleton * fix: controller binding to instantiate and self-register on controller container * fix: move signout endpoint to auth controller * wip: define inversify controllers in the controller container * fix(auth): bind inversify controllers to controller container * fix(auth): linter issues * fix(auth): specs * fix(auth): inversify controllers bindings * wip: endpoint resolving * wip: add endpoint for more auth controllers * wip: add sessions controller endpoint resolvings * wip: add subscription invites endpoint resolvings * wip: add subscription tokens endpoint resolvings * wip: add all binding for auth server controllers * wip: fix migrations path * fix: configure default env vars and ci setup
32 lines
883 B
TypeScript
32 lines
883 B
TypeScript
import 'reflect-metadata'
|
|
|
|
import 'newrelic'
|
|
|
|
import { Logger } from 'winston'
|
|
|
|
import { ContainerConfigLoader } from '../src/Bootstrap/Container'
|
|
import TYPES from '../src/Bootstrap/Types'
|
|
import { Env } from '../src/Bootstrap/Env'
|
|
import { DomainEventSubscriberFactoryInterface } from '@standardnotes/domain-events'
|
|
import * as dayjs from 'dayjs'
|
|
import * as utc from 'dayjs/plugin/utc'
|
|
|
|
const container = new ContainerConfigLoader()
|
|
void container.load().then((container) => {
|
|
dayjs.extend(utc)
|
|
|
|
const env: Env = new Env()
|
|
env.load()
|
|
|
|
const logger: Logger = container.get(TYPES.Auth_Logger)
|
|
|
|
logger.info('Starting worker...')
|
|
|
|
const subscriberFactory: DomainEventSubscriberFactoryInterface = container.get(
|
|
TYPES.Auth_DomainEventSubscriberFactory,
|
|
)
|
|
subscriberFactory.create().start()
|
|
|
|
setInterval(() => logger.info('Alive and kicking!'), 20 * 60 * 1000)
|
|
})
|