Skip to content

Commit 2ebd236

Browse files
author
anthhub
committed
feat: port
1 parent be0c46d commit 2ebd236

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
with:
3434
hosts: "118.190.37.169"
3535
privateKey: ${{ secrets.PRIVATE_KEY }}
36-
command: cd /root/web/anthhub/deploy/nest-mini-blog/dist && npm i pm2 -g && npm run prod
36+
command: cd /root/web/anthhub/deploy/nest-mini-blog/dist && npm i pm2 -g && pm2 start main.js --name 'awesome-nest' --env production

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"prod": "cross-env NODE_ENV=production pm2 start dist/main.js --name 'awesome-nest'",
99
"stop": "pm2 delete awesome-nest",
10-
"build": "tsc -p tsconfig.build.json",
10+
"build": "tsc -p tsconfig.build.json && cp -R ./node_modules ./dist/node_modules",
1111
"format": "prettier --config .prettierrc --write \"src/**/*.ts\"",
1212
"start": "ts-node -r tsconfig-paths/register src/main.ts",
1313
"start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" ",

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ async function bootstrap() {
5454
app.useGlobalInterceptors(new TransformInterceptor())
5555
app.useGlobalPipes(new ValidationPipe())
5656

57+
config.port = 7700
58+
5759
await app.listen(config.port, config.hostName, () => {
5860
Logger.log(
5961
`Awesome-nest API server has been started on http://${config.hostName}:${config.port}`,

0 commit comments

Comments
 (0)