Skip to content
Snippets Groups Projects
Commit d5d6cbd7 authored by tpgus2603's avatar tpgus2603
Browse files

Merge branch 'deploy' of https://git.ajou.ac.kr/websystem1/webback into deploy

parents 1478abaa f75ebb14
No related branches found
No related tags found
1 merge request!42[#25] 배포코드 master브랜치로 이동
node_modules/
.env
config.json/
resources/
File moved
MongoDB URI: mongodb+srv://admin:lim1234!!@goodmeeting.vkniz.mongodb.net/
(node:44244) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use `node --trace-warnings ...` to show where the warning was created)
(node:44244) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
✅ MongoDB 연결 성공
Rdb데이터베이스 연결 성공.
모든 모델이 성공적으로 동기화되었습니다.
Server is running on 8080
File moved
start.sh 0 → 100755
#!/bin/bash
# Define application file names
APP_JS="app.js"
WS_SERVER_JS="wsServer.js"
# Find and kill processes for app.js
APP_PID=$(pgrep -f "node .*${APP_JS}")
if [ -n "$APP_PID" ]; then
echo "Stopping ${APP_JS} with PID: $APP_PID"
kill -9 "$APP_PID"
else
echo "No running process found for ${APP_JS}"
fi
# Find and kill processes for wsServer.js
WS_SERVER_PID=$(pgrep -f "node .*${WS_SERVER_JS}")
if [ -n "$WS_SERVER_PID" ]; then
echo "Stopping ${WS_SERVER_JS} with PID: $WS_SERVER_PID"
kill -9 "$WS_SERVER_PID"
else
echo "No running process found for ${WS_SERVER_JS}"
fi
# Start app.js with nohup
echo "Starting ${APP_JS}..."
nohup node "${APP_JS}" > output.log 2>&1 &
echo "${APP_JS} started with PID: $!"
# Start wsServer.js with nohup
echo "Starting ${WS_SERVER_JS}..."
nohup node "${WS_SERVER_JS}" > weblog.log 2>&1 &
echo "${WS_SERVER_JS} started with PID: $!"
node:internal/modules/cjs/loader:1143
throw err;
^
Error: Cannot find module './resources/firebase/yanawa-89d9d-firebase-adminsdk-d1inm-24566bf0b9.json'
Require stack:
- /home/ubuntu/webback/wsServer.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/home/ubuntu/webback/wsServer.js:18:37)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/ubuntu/webback/wsServer.js' ]
}
Node.js v18.20.5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment