Skip to content

Commit 3012eb8

Browse files
committed
update: build and start scripts in package.json, fix file path in env.mts
1 parent 0b888de commit 3012eb8

File tree

3 files changed

+5
-28
lines changed

3 files changed

+5
-28
lines changed

apps/book-server/.swcrc

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/server/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
"main": "/src/main.mts",
1616
"type": "module",
1717
"scripts": {
18-
"dev": "nodemon --watch './**/*.mts' --exec 'node --import @swc-node/register/esm-register' ./src/main.ts | pino-pretty",
19-
"stage": "pnpm ssm pull -e stage && NODE_ENV=production pnpm start",
20-
"prod": "pnpm ssm pull -e production && NODE_ENV=production pnpm start",
21-
"build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",
22-
"build:prod": "tsc --project tsconfig.prod.json && tsc-alias -p tsconfig.prod.json",
23-
"start": "node dist/src/main.js",
18+
"dev": "nodemon --watch './**/*.mts' --exec 'node --import @swc-node/register/esm-register' ./src/main.mts | pino-pretty",
19+
"start": "node --import @swc-node/register/esm-register dist/src/main.mjs",
20+
"build": "tsc --project tsconfig.json",
21+
"build:prod": "tsc --project tsconfig.prod.json",
2422
"codegen": "graphql-codegen --config codegen.ts",
2523
"test": "pnpm jest --detectOpenHandles",
2624
"create-service": "tsx ./scripts/createService.ts",

apps/server/src/env.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const appEnv: AppEnvironment = ['stage', 'production'].includes(dockerEnv)
2626
: 'development'
2727

2828
const envFile = envFiles[dockerEnv]
29-
const prefix = dockerEnv === 'development' ? './env' : '../env'
29+
const prefix = './env'
3030

3131
function resolveDir(dir: string): string {
3232
const __filename = fileURLToPath(import.meta.url)

0 commit comments

Comments
 (0)