Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[功能開發] 修改開發時 yml #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ pnpm install
pnpm dev:frontend
```

## 前後端一起啟動
檢查 localhost:300 是否正常
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port 需要改成 3000


## 啟動後端服務

先開啟 docker

在根目錄輸入

```
pnpm install

pnpm dev
docker compose -f docker-compose.dev.yml u
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker compose -f docker-compose.dev.yml u 少了一個 p
完整指令應該是
docker compose -f docker-compose.dev.yml up

```

檢查 localhost:8000
4 changes: 2 additions & 2 deletions backend/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express, { Express, NextFunction, Request, Response, Router } from "express";
import { createServer, Server, IncomingMessage, ServerResponse } from "http";
import { createServer, Server } from "http";
import { SocketConnection } from "./src/Shared/infra/socket";
import { AppDataSource, configDataSource } from "./src/Shared/infra/data-source";
import { SharedRouter } from "./src/Shared/api/Shared.router";
Expand All @@ -11,7 +11,7 @@ dotenv.config();

class Bootstrap {
private readonly app: Express;
public readonly httpServer: Server<typeof IncomingMessage, typeof ServerResponse>;
public readonly httpServer: Server;

constructor() {
this.app = express();
Expand Down
14 changes: 7 additions & 7 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "",
"main": "main.js",
"scripts": {
"test:incanGold_domain": "npx vitest --run --dir ./test/IncanGold/unit_test",
"build:for_test":"npx tsc",
"test:incanGold_domain": "npx vitest --run --dir ./test/IncanGold/unit_test",
"build:for_test": "npx tsc",
"build": "tsc -p tsconfig.prod.json",
"dev": "nodemon",
"dev": "npx ts-node main.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我 docker 起來後,後端程式碼啟動會報錯誤 @@

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外 CI/CD 似乎 build 不起來

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我這邊 後端程式碼啟動 沒有報錯 🤔 為什麼~~

"start": "npx ts-node main.ts"
},
"type": "commonjs",
Expand All @@ -30,15 +30,15 @@
"@types/node": "^16.11.10",
"@types/supertest": "^2.0.12",
"@types/uuid": "^9.0.2",
"vitest": "^0.33.0",
"nodemon": "^2.0.22",
"dotenv": "^16.3.1",
"nodemon": "^2.0.22",
"socket.io-client": "^4.7.2",
"supertest": "^6.3.3",
"testcontainers": "^9.12.0",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"ttypescript": "^1.5.15",
"typescript-transform-paths": "^3.4.6"
"typescript-transform-paths": "^3.4.6",
"vitest": "^0.33.0"
}
}
Loading
Loading