diff --git a/bin/www b/bin/www index 5e21edf..699ac3b 100644 --- a/bin/www +++ b/bin/www @@ -12,7 +12,7 @@ var http = require('http'); * Get port from environment and store in Express. */ -var port = normalizePort(process.env.PORT || '3000'); +var port = normalizePort(process.env.PORT || '3333'); app.set('port', port); /** diff --git a/models/notificationSchema.js b/modules/notificationSchema.js similarity index 100% rename from models/notificationSchema.js rename to modules/notificationSchema.js diff --git a/routes/auth/index.js b/routes/auth/index.js index 22ee94a..a0463b1 100644 --- a/routes/auth/index.js +++ b/routes/auth/index.js @@ -5,6 +5,6 @@ router.use('/signin', require('./signin')); router.use('/signup', require('./signup')); router.use('/social', require('./social')); router.use('/facebook', require('./facebook')); -router.use('/pwfinder', require('./pwfinder')); +router.use('/pwFinder', require('./pwFinder')); module.exports = router; \ No newline at end of file diff --git a/routes/auth/signup.js b/routes/auth/signup.js index 9735675..8b1fa96 100644 --- a/routes/auth/signup.js +++ b/routes/auth/signup.js @@ -7,7 +7,7 @@ const statusCode = require('../../modules/utils/statusCode'); const db = require('../../modules/pool'); const encrytion = require('../../modules/encrytion/encrytionModule'); const crypto = require('crypto-promise'); -const Notification = require('../../models/notificationSchema'); +const Notification = require('../../modules/notificationSchema'); //회원가입 router.post('/', async (req, res) => { diff --git a/routes/index.js b/routes/index.js index 62a1ab5..c3c9104 100644 --- a/routes/index.js +++ b/routes/index.js @@ -8,7 +8,6 @@ router.use('/mypage', require('./mypage/index')); router.use('/archive', require('./archive/index')); router.use('/notification', require('./notification/index')); router.use('/category', require('./category/index')); -router.use('/practice', require('./practice')); router.use('/search', require('./search/index')); diff --git a/routes/notification/notification.js b/routes/notification/notification.js index 82fe3c9..8d6e4a6 100644 --- a/routes/notification/notification.js +++ b/routes/notification/notification.js @@ -5,7 +5,7 @@ const resMessage = require('../../modules/utils/responseMessage'); const statusCode = require('../../modules/utils/statusCode'); const utils = require('../../modules/utils/utils'); const authUtils = require('../../modules/utils/authUtils'); -const Notification = require('../../models/notificationSchema'); //코드에 쓸 스키마 가져오기 +const Notification = require('../../modules/notificationSchema'); //코드에 쓸 스키마 가져오기 const cron = require('node-cron'); //스케쥴러 const moment = require('moment'); diff --git a/routes/practice.js b/routes/practice.js deleted file mode 100644 index ef5ed94..0000000 --- a/routes/practice.js +++ /dev/null @@ -1,33 +0,0 @@ -var express = require('express'); -var router = express.Router(); -const db = require('../modules/pool'); -const resMessage = require('../modules/utils/responseMessage'); -const statusCode = require('../modules/utils/statusCode'); -const utils = require('../modules/utils/utils'); -const authUtils = require('../modules/utils/authUtils'); -const Notification = require('../models/notificationSchema'); - -router.get('/', async (req, res) => { - // 영우 알림 - archiveIdx = 3; - articleIdx = 1; - const getAddArchiveUserQuery = 'SELECT user_idx FROM archiveAdd WHERE archive_idx = ?'; - const getAddArchiveUserResult = await db.queryParam_Arr(getAddArchiveUserQuery, [archiveIdx]); - - for (let i = 0, userData; userData = getAddArchiveUserResult[i]; i++) { - userData.isRead = false; - } - - result = await Notification.create({ - user_idx: getAddArchiveUserResult, - article_idx: articleIdx, - notification_type: 0 - // }).then((result) => { - // res.status(statusCode.OK).send(utils.successTrue(statusCode.CREATED, resMessage.SAVE_SUCCESS, result)); - // }).catch((err) => { - // res.status(statusCode.OK).send(utils.successFalse(statusCode.DB_ERROR, resMessage.SAVE_FAIL)); - }); - console.log(result); -}) - -module.exports = router; \ No newline at end of file