fix: temp save
This commit is contained in:
@@ -8,6 +8,7 @@ FROM nodebt AS deps
|
||||
RUN mkdir -p /app/workspace
|
||||
WORKDIR /app
|
||||
COPY package.json /app/
|
||||
RUN pnpm approve-builds utf-8-validate node-datachannel utp-native
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --no-frozen-lockfile
|
||||
|
||||
FROM deps AS app
|
||||
|
||||
@@ -12,6 +12,7 @@ import WebTorrent, { type Torrent } from 'webtorrent';
|
||||
// Configuration
|
||||
const API_PORT = 6080;
|
||||
const TRACKER_PORT = 6081;
|
||||
const SEEDING_PORT = 6082;
|
||||
const STATIC_API_PATH = '/api/static';
|
||||
const LOCAL_IP = '127.0.0.1';
|
||||
const WORKSPACE_PATH = 'workspace';
|
||||
@@ -72,7 +73,10 @@ async function startTracker(): Promise<void> {
|
||||
}
|
||||
|
||||
// Tracker and WebTorrent client
|
||||
const webTorrent = new WebTorrent({});
|
||||
const webTorrent = new WebTorrent({
|
||||
// @ts-ignore
|
||||
torrentPort: SEEDING_PORT,
|
||||
});
|
||||
|
||||
// Generate mock file
|
||||
async function generateMockFile(filePath: string, size: number) {
|
||||
|
||||
@@ -18,12 +18,5 @@
|
||||
"devDependencies": {
|
||||
"@types/create-torrent": "^5.0.2",
|
||||
"@types/webtorrent": "^0.110.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"utf-8-validate",
|
||||
"node-datachannel",
|
||||
"utp-native"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
9
packages/testing-torrents/tsconfig.json
Normal file
9
packages/testing-torrents/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"composite": true
|
||||
},
|
||||
"include": ["./main.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user