Skip to content

Commit

Permalink
Нейминг
Browse files Browse the repository at this point in the history
  • Loading branch information
joker77-github committed Sep 25, 2024
1 parent 9d642be commit 0280de6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main.rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { Component } from '#shared/const.js';
async function bootstrap() {
const container = new Container();

container.bind<RESTApplication>(Component.RestApp).to(RESTApplication).inSingletonScope();
container.bind<RESTApplication>(Component.RestApplication).to(RESTApplication).inSingletonScope();
container.bind<PinoLogger>(Component.Logger).to(PinoLogger).inSingletonScope();
container.bind<Config<RestSchema>>(Component.Config).to(RestConfig).inSingletonScope();

const application = container.get<RESTApplication>(Component.RestApp);
const application = container.get<RESTApplication>(Component.RestApplication);
await application.init();
}

Expand Down
3 changes: 2 additions & 1 deletion src/shared/const.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { RESTApplication } from '../rest/rest.application.js';

Check warning on line 1 in src/shared/const.ts

View workflow job for this annotation

GitHub Actions / Check

'RESTApplication' is defined but never used
import { City } from './types/index.js';

export const CITIES: City[] = [
Expand Down Expand Up @@ -50,7 +51,7 @@ export const CITIES_LIST = CITIES.map((city) => city.name);
export const FACILITIES = ['Breakfast', 'Air conditioning', 'Laptop friendly workspace', 'Baby seat', 'Washer', 'Towels', 'Fridge'];

export const Component = {
RestApp: Symbol.for('RestApp'),
RestApplication: Symbol.for('RestApplication'),
Logger: Symbol.for('Logger'),
Config: Symbol.for('Config'),
} as const;

0 comments on commit 0280de6

Please sign in to comment.