초기 PM 소스 전체 업로드

This commit is contained in:
koj729
2026-06-12 17:14:03 +09:00
commit 4e33c9a02a
1769 changed files with 377797 additions and 0 deletions

15
server.js Normal file
View File

@@ -0,0 +1,15 @@
const app = require('./app');
const http = require('http');
const socket = require('./socket');
const server = http.createServer(app);
socket.init(server); // 웹소켓 초기화
const env = process.env.NODE_ENV // 'development', 'production', 'individual'
const host = env == 'production' ? process.env.PRODUCTION_IP : (env == 'individual' ? process.env.LOCAL_IP : '0.0.0.0');
const port = env == 'production' ? process.env.PRODUCTION_PORT : (env == 'individual' ? process.env.LOCAL_PORT : '6565');
server.listen(port, host, (e) => {
const displayHost = host === '0.0.0.0' ? 'localhost' : host;
console.log(`>> Web Server Start : http://${displayHost}:${port}/ 번 포트에서 대기 중`);
});