Skip to content

Commit

Permalink
[Task] #6 production ready code (m)
Browse files Browse the repository at this point in the history
move httpdocs folder to dist
have compile without sourcemaps for faster speed
  • Loading branch information
Type-Style committed Jan 12, 2024
1 parent 9cc6446 commit c19508f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- run: node --version
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build --if-present
- run: npm run build:prod --if-present
- name: Start server and test server response
run: |
npm start &
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"type": "module",
"scripts": {
"build": "npx tsc",
"build": "npx tsc && cp -R httpdocs/ dist/",
"build:prod": "npx tsc -p ./tsconfig.prod.json && cp -R httpdocs/ dist/",
"start": "node dist/app.js",
"dev": "nodemon src/app.ts",
"lint": "eslint . --fix"
Expand All @@ -27,3 +28,5 @@
"express": "^4.18.2"
}
}


6 changes: 6 additions & 0 deletions tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false
}
}

0 comments on commit c19508f

Please sign in to comment.