Skip to content

Commit b5299d8

Browse files
oana-loleanjlie
andcommitted
feat: initialize POS service (#3509)
* feat(wip): pos service * Completed POS service init * Added docker files and missing scripts * Removed editor code after handling conflicts * Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile * Updated docker compose files for c9 and hlb * Updated ports and env var names from config * fix: install ts-node-dev, add main script to index.ts --------- Co-authored-by: Nathan Lie <[email protected]>
1 parent f915261 commit b5299d8

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

packages/point-of-sale/src/app.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Koa, { DefaultState } from 'koa'
77
import Router from '@koa/router'
88
import bodyParser from 'koa-bodyparser'
99
import cors from '@koa/cors'
10+
<<<<<<< HEAD
1011
import {
1112
CreateMerchantContext,
1213
DeleteMerchantContext,
@@ -19,16 +20,21 @@ import {
1920
import { PosDeviceService } from './merchant/devices/service'
2021
import { MerchantService } from './merchant/service'
2122
import { PaymentContext, PaymentRoutes } from './payments/routes'
23+
=======
24+
>>>>>>> b66c9448b (feat: initialize POS service (#3509))
2225

2326
export interface AppServices {
2427
logger: Promise<Logger>
2528
knex: Promise<Knex>
2629
config: Promise<IAppConfig>
30+
<<<<<<< HEAD
2731
merchantRoutes: Promise<MerchantRoutes>
2832
posDeviceRoutes: Promise<PosDeviceRoutes>
2933
posDeviceService: Promise<PosDeviceService>
3034
merchantService: Promise<MerchantService>
3135
paymentRoutes: Promise<PaymentRoutes>
36+
=======
37+
>>>>>>> b66c9448b (feat: initialize POS service (#3509))
3238
}
3339

3440
export type AppContainer = IocContract<AppServices>
@@ -42,13 +48,16 @@ export interface AppContextData {
4248

4349
export type AppContext = Koa.ParameterizedContext<DefaultState, AppContextData>
4450

51+
<<<<<<< HEAD
4552
export type AppRequest<ParamsT extends string = string> = Omit<
4653
AppContext['request'],
4754
'params'
4855
> & {
4956
params: Record<ParamsT, string>
5057
}
5158

59+
=======
60+
>>>>>>> b66c9448b (feat: initialize POS service (#3509))
5261
export class App {
5362
private posServer!: Server
5463
public isShuttingDown = false
@@ -140,7 +149,11 @@ export class App {
140149
})
141150

142151
koa.context.container = this.container
152+
<<<<<<< HEAD
143153
koa.context.logger = this.logger
154+
=======
155+
koa.context.logger = await this.container.use('logger')
156+
>>>>>>> b66c9448b (feat: initialize POS service (#3509))
144157

145158
koa.use(
146159
async (

packages/point-of-sale/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export function initIocContainer(
3838
logger.level = config.logLevel
3939
return logger
4040
})
41-
4241
container.singleton('knex', async (deps: IocContract<AppServices>) => {
4342
const logger = await deps.use('logger')
4443
const config = await deps.use('config')

pnpm-lock.yaml

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)