백엔드 버젼표시

This commit is contained in:
backuppc
2026-01-20 15:13:21 +09:00
parent ea070816e3
commit 467d0f5917
2 changed files with 23 additions and 20 deletions

1
.gitignore vendored
View File

@@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
public/webftp-backend.exe

View File

@@ -9,6 +9,8 @@
* - **NEW**: 포트 충돌 자동 감지 및 프로세스 종료 기능
*/
const APP_VERSION = "0.0.1";
const WebSocket = require('ws');
const ftp = require('basic-ftp');
const fs = require('fs');
@@ -51,7 +53,7 @@ function startServer() {
});
wss.on('listening', () => {
console.log(`\n🚀 WebZilla FTP Proxy Server가 ws://localhost:${PORT} 에서 실행 중입니다.`);
console.log(`\n🚀 WebZilla FTP Proxy Server [v${APP_VERSION}] 가 ws://localhost:${PORT} 에서 실행 중입니다.`);
console.log(`📂 설정 폴더: ${configDir}`);
});
@@ -239,8 +241,8 @@ function startServer() {
case 'DOWNLOAD':
if (client.closed) {
ws.send(JSON.stringify({ type: 'error', message: 'FTP 연결이 끊어져 있습니다.' }));
return;
ws.send(JSON.stringify({ type: 'error', message: 'FTP 연결이 끊어져 있습니다.' }));
return;
}
try {
const { remotePath, localPath, transferId } = data;
@@ -277,8 +279,8 @@ function startServer() {
case 'UPLOAD':
if (client.closed) {
ws.send(JSON.stringify({ type: 'error', message: 'FTP 연결이 끊어져 있습니다.' }));
return;
ws.send(JSON.stringify({ type: 'error', message: 'FTP 연결이 끊어져 있습니다.' }));
return;
}
try {
const { remotePath, localPath, transferId } = data;