Skip to content

Commit

Permalink
#36 중간 점검
Browse files Browse the repository at this point in the history
  • Loading branch information
parksewon committed Dec 18, 2021
2 parents 3c790b8 + 98b69dd commit e0045c0
Show file tree
Hide file tree
Showing 868 changed files with 73,232 additions and 399 deletions.
9 changes: 5 additions & 4 deletions config/db.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var mysql = require('mysql');
const env = require('./env');

const db = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'qwerty123',
database: 'hialcohol',
host: env.host,
user: env.user,
password: env.password,
database: env.database,
dateStrings: 'date'
});

Expand Down
7 changes: 7 additions & 0 deletions config/env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
host: 'localhost',
user: 'root',
password: 'qwerty123',
database: 'hialcohol',
port: 3000
};
2 changes: 1 addition & 1 deletion config/recipe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ VALUES(26, '모히또', '적당량', '라임과 설탕, 민트잎을 넣어 살
INSERT INTO `recipe`
VALUES(27, '러스티 네일', '스카치위스키 1: 드람부이 1', '온더록 스타일로 한 후, 스카치 위스키와 드람부이를 넣어 가볍게 젓는다.');
INSERT INTO `recipe`
VALUES(28, '위스키 소다', '적당량', '텀블러에 위스키를 붓고 널음을 넣은 후 소다수를 적당량 채운다.');
VALUES(28, '위스키 소다', '적당량', '텀블러에 위스키를 붓고 얼음을 넣은 후 소다수를 적당량 채운다.');
INSERT INTO `recipe`
VALUES(29, '위스키 온더락', '적당량', '얼음 위에 위스키를 붓는다.');
INSERT INTO `recipe`
Expand Down
25 changes: 13 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
const express = require('express');
const app = express();
const port = 3000;
const bodyParser = require('body-parser');
const indexRouter = require('./routes/indexRouter.js')
const session = require('express-session');
const MySQLStore = require('express-mysql-session')(session);
const passport = require('passport');
const flash = require('connect-flash');
const cookieParser = require('cookie-parser');

const indexRouter = require('./routes/indexRouter.js')
const oauthRouter = require('./routes/loginRouter.js');
const likeRouter = require('./routes/likeRouter');
const boardRouter = require('./routes/boardRouter.js')
const search_listRouter = require('./routes/search_listRouter.js');
const mapRouter = require('./routes/mapRouter');
const passport = require('passport');
const flash = require('connect-flash');

const passportConfig = require('./passport');
const cookieParser = require('cookie-parser');
const boardProcessRouter = require('./routes/boardProcessRouter.js');
const myboardRouter = require('./routes/myboardRouter.js');
const env = require('./config/env.js');

const boardProcessRouter = require('./routes/boardProcessRouter.js')
const db = require('./config/db.js')
const port = env.port;

app.use(cookieParser('ras'));
passportConfig();
Expand All @@ -31,11 +31,11 @@ app.use(session({
secure: false,
saveUninitialized: true,
store: new MySQLStore({
host: "localhost",
host: env.host,
port: 3306,
user: "root",
password: "qwerty123",
database: "hialcohol"
user: env.user,
password: env.password,
database: env.database
})
}));
app.use(passport.initialize());
Expand All @@ -60,6 +60,7 @@ app.use('/board_process', boardProcessRouter);

app.use('/likes', likeRouter);

app.use('/myboard', myboardRouter);

app.get('/logout', function(req, res) {
req.logout();
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/is-ci

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nodemon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nodetouch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nopt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 132 additions & 0 deletions node_modules/@sindresorhus/is/dist/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e0045c0

Please sign in to comment.