Skip to content
Snippets Groups Projects
Commit b6cb0889 authored by Ubuntu's avatar Ubuntu
Browse files

refactor:서버 deploy코드 동기

parent ac6b8561
No related branches found
No related tags found
1 merge request!42[#25] 배포코드 master브랜치로 이동
......@@ -19,7 +19,7 @@ app.use(morgan('dev')); //로깅용
// CORS 설정
app.use(
cors({
origin: 'https://yanawa.shop',
origin:[ process.env.FROENT_URL,'https://yanawa.shop'],
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization'],
credentials: true,
......@@ -57,7 +57,7 @@ app.set('trust proxy', 1);
console.log('MongoDB URI:', process.env.MONGO_URI);
//라우터 등록
const authRoutes = require('./routes/auth');
app.use('/auth', authRoutes);
app.use('/api/auth', authRoutes);
const scheduleRoutes = require('./routes/schedule');
app.use('/api/schedule', scheduleRoutes);
......
/home/ubuntu/webback/app.js:20
<<<<<<< HEAD
^^
SyntaxError: Unexpected token '<<'
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
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)
at node:internal/main/run_main_module:28:49
Node.js v18.20.5
MongoDB URI: mongodb+srv://admin:lim1234!!@goodmeeting.vkniz.mongodb.net/
(node:77051) [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:77051) [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
GET /api/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php 404 9.005 ms - 193
GET / 404 2.052 ms - 139
GET / 404 1.179 ms - 139
GET / 404 1.045 ms - 139
GET / 404 1.827 ms - 139
GET / 404 1.101 ms - 139
GET /download/powershell/ 404 1.186 ms - 159
GET /get.php 404 0.895 ms - 146
GET / 404 1.429 ms - 139
GET /api/im/v2/app/config 404 1.289 ms - 159
GET /api/ 404 1.099 ms - 143
GET /api/ 404 1.036 ms - 143
GET /api/c/a 404 0.920 ms - 146
GET /api/ping 404 0.873 ms - 147
GET /api/notice 404 0.902 ms - 149
GET /api/config 404 0.936 ms - 149
GET /api/version 404 0.871 ms - 150
GET /api/v1/config 404 1.131 ms - 152
GET /api/index/web 404 0.706 ms - 152
GET /api/Business/ 404 0.752 ms - 152
GET /api/shop/getKF 404 1.018 ms - 153
GET /api/index/init 404 0.893 ms - 153
GET /api/Event/basic 404 0.632 ms - 154
GET /api/apps/config 404 0.583 ms - 154
GET /api/front/index 404 0.941 ms - 154
GET /api/app/indexList 404 0.850 ms - 156
GET /api/common/config 404 0.784 ms - 156
GET /api/Home/videoNew 404 2.733 ms - 156
GET /api/getCustomLink 404 0.672 ms - 156
GET /api/uploads/apimap 404 0.584 ms - 157
GET /api/v1/member/kefu 404 0.642 ms - 157
GET /api/config/getkefu 404 0.684 ms - 157
GET /api/site/getInfo.do 404 0.667 ms - 158
GET /api/message/webInfo 404 0.595 ms - 158
GET /api/index/webconfig 404 0.703 ms - 158
GET /api/index/getConfig 404 0.745 ms - 158
GET /api/index/grailindex 404 0.931 ms - 159
GET /api/shares/hqStrList 404 0.770 ms - 159
GET /api/user/ismustmobile 404 0.753 ms - 160
GET /api/user/ismustmobile 404 0.697 ms - 160
GET /api/user/ismustmobile 404 0.616 ms - 160
GET /api/banner?appKey=bxefdn 404 1.134 ms - 149
GET /api/Config/getShowConfig 404 0.590 ms - 163
GET /api/home/customerService 404 2.229 ms - 163
GET /api/client/app/config.do 404 0.698 ms - 163
GET /api/product/getPointStore 404 0.703 ms - 164
GET /api/currency/quotation_new 404 0.751 ms - 165
GET /api/vue/transaction/config 404 0.821 ms - 165
GET /api/predict-whole-panel.do 404 0.800 ms - 165
GET /api/common/menus?lang=zh-Hans 404 0.767 ms - 155
GET /api/appVersion?mobile_system=2 404 0.711 ms - 153
GET /api/public/?service=Home.getConfig 404 0.797 ms - 150
GET /api/unSecurity/app/listAppVersionInfo 404 0.793 ms - 176
GET /api/stock/getSingleStock.do?code=002405 404 0.739 ms - 166
GET /api/system/systemConfigs/getCustomerServiceLink 404 0.780 ms - 186
GET /api/v/index/queryOfficePage?officeCode=customHomeLink 404 0.805 ms - 166
GET /api/im/v2/app/config 404 2.524 ms - 159
GET /api/ 404 0.739 ms - 143
GET /api/ 404 0.792 ms - 143
GET /api/c/a 404 0.761 ms - 146
GET /api/ping 404 0.715 ms - 147
GET /api/config 404 0.930 ms - 149
POST /api/notice 404 24.787 ms - 150
GET /api/version 404 0.963 ms - 150
GET /api/v1/config 404 0.761 ms - 152
GET /api/Business/ 404 0.618 ms - 152
GET /api/index/web 404 0.595 ms - 152
GET /api/shop/getKF 404 0.747 ms - 153
GET /api/Event/basic 404 0.612 ms - 154
GET /api/front/index 404 0.620 ms - 154
GET /api/index/init 404 0.647 ms - 153
GET /api/apps/config 404 0.657 ms - 154
GET /api/app/indexList 404 0.925 ms - 156
GET /api/common/config 404 0.645 ms - 156
GET /api/Home/videoNew 404 2.724 ms - 156
POST /api/getCustomLink 404 13.160 ms - 157
GET /api/v1/member/kefu 404 0.575 ms - 157
GET /api/uploads/apimap 404 0.538 ms - 157
GET /api/config/getkefu 404 0.724 ms - 157
GET /api/site/getInfo.do 404 0.511 ms - 158
GET /api/message/webInfo 404 0.683 ms - 158
GET /api/index/webconfig 404 0.714 ms - 158
GET /api/index/getConfig 404 0.676 ms - 158
GET /api/index/grailindex 404 0.676 ms - 159
GET /api/shares/hqStrList 404 0.590 ms - 159
POST /api/user/ismustmobile 404 0.950 ms - 161
GET /api/user/ismustmobile 404 0.558 ms - 160
POST /api/user/ismustmobile 404 0.805 ms - 161
GET /api/banner?appKey=bxefdn 404 0.834 ms - 149
GET /api/Config/getShowConfig 404 0.621 ms - 163
GET /api/client/app/config.do 404 0.643 ms - 163
GET /api/home/customerService 404 0.613 ms - 163
GET /api/product/getPointStore 404 0.842 ms - 164
GET /api/currency/quotation_new 404 0.812 ms - 165
GET /api/vue/transaction/config 404 0.669 ms - 165
GET /api/predict-whole-panel.do 404 1.121 ms - 165
GET /api/common/menus?lang=zh-Hans 404 0.788 ms - 155
GET /api/appVersion?mobile_system=2 404 1.182 ms - 153
GET /api/public/?service=Home.getConfig 404 0.590 ms - 150
GET /api/unSecurity/app/listAppVersionInfo 404 0.642 ms - 176
GET /api/stock/getSingleStock.do?code=002405 404 2.576 ms - 166
POST /api/system/systemConfigs/getCustomerServiceLink 404 0.816 ms - 187
GET /api/v/index/queryOfficePage?officeCode=customHomeLink 404 0.642 ms - 166
GET http://example.com/ 404 2.861 ms - 139
GET http://example.com/ 404 0.862 ms - 139
GET / 404 0.856 ms - 139
GET /favicon.ico 404 0.860 ms - 150
GET / 404 0.899 ms - 139
GET / 404 0.812 ms - 139
GET /manage/account/login 404 0.807 ms - 159
GET /admin/index.html 404 0.875 ms - 155
GET /index.html 404 0.870 ms - 149
GET /+CSCOE+/logon.html 404 0.831 ms - 157
GET /cgi-bin/login.cgi 404 0.864 ms - 156
GET /logon.htm 404 0.788 ms - 148
GET /login.jsp 404 0.845 ms - 148
GET /doc/index.html 404 0.922 ms - 153
GET / 404 0.801 ms - 139
GET / 404 0.818 ms - 139
GET / 404 0.938 ms - 139
GET / 404 1.083 ms - 139
GET / 404 0.872 ms - 139
GET / 404 0.892 ms - 139
GET / 404 0.871 ms - 139
GET /api/.env 404 0.821 ms - 147
POST /api/.env 404 1.818 ms - 148
GET /api/index.php/v1/config/application?public=true 404 0.739 ms - 174
(node:23273) [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
(node:77052) [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:23273) [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 연결 실패: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at _handleConnectionErrors (/home/ubuntu/webback/node_modules/mongoose/lib/connection.js:909:11)
at NativeConnection.openUri (/home/ubuntu/webback/node_modules/mongoose/lib/connection.js:860:11)
at async connectMongoDB (/home/ubuntu/webback/wsServer.js:28:5) {
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) { 'localhost:27017' => [ServerDescription] },
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: null,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined
}
(node:77052) [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에 성공적으로 연결되었습니다.
WebSocket 채팅 서버가 8081 포트에서 실행 중입니다.
......@@ -25,7 +25,7 @@ let chatRooms = {};
// MongoDB 연결 설정
async function connectMongoDB() {
try {
await mongoose.connect('mongodb://localhost:27017/chat', {
await mongoose.connect(process.env.MONGO_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
......@@ -354,4 +354,4 @@ function constructReply(message) {
}
// MongoDB 연결 후 WebSocket 서버 시작
connectMongoDB();
\ No newline at end of file
connectMongoDB();
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