Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유제
/
CultureGallery
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
YujeLee
2020-12-10 08:41:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4545492f822eb1c91ae275f6f0a8d9dfe4d72c52
4545492f
1 parent
2eb90926
전체적 개편
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
.gitignore
app.js
package-lock.json
package.json
.gitignore
View file @
4545492
node_modules
dist/*
*.log
#env file#
.env
\ No newline at end of file
...
...
app.js
View file @
4545492
const
express
=
require
(
'express'
);
const
path
=
require
(
'path'
);
const
app
=
express
();
var
bodyparser
=
require
(
'body-parser'
);
var
url
=
require
(
'url'
);
require
(
'dotenv'
).
config
();
//화면 별 router 연결, 라우터 호출해서 페이지를 불러오는데 사용함.
var
mainRouter
=
require
(
'./routes'
)
//호출시 index.js 실행 (main.js : title 할당하고 main.html 열어줌)
...
...
@@ -19,11 +22,18 @@ app.use('/', mainRouter);
//css, image 등 정적 파일을 public에서 불러옴 -> html과 연결함
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'public'
)));
app
.
get
(
"/find"
,
function
(
req
,
res
)
{
var
urlParsed
=
url
.
parse
(
req
.
url
,
true
);
var
querystring
=
urlParsed
.
query
;
// 값이 querystring.word 으로 불러와짐 ( 검색 단어) : 제목에서 find만 구현하면됨.
res
.
send
(
querystring
.
word
);
});
app
.
get
(
'/logout'
,
function
(
req
,
res
)
{
res
.
send
(
"Logout success"
);
});
app
.
listen
(
app
.
get
(
'port'
),
()
=>
{
console
.
log
(
`Server is running at
${
app
.
get
(
'port'
)}
`
);
});
...
...
package-lock.json
View file @
4545492
...
...
@@ -146,6 +146,11 @@
"resolved"
:
"https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
,
"integrity"
:
"sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"dotenv"
:
{
"version"
:
"8.2.0"
,
"resolved"
:
"https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz"
,
"integrity"
:
"sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"ee-first"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
,
...
...
package.json
View file @
4545492
...
...
@@ -14,6 +14,8 @@
"author"
:
"Hyoseob Song"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"body-parser"
:
"^1.19.0"
,
"dotenv"
:
"^8.2.0"
,
"ejs"
:
"^3.1.5"
,
"express"
:
"^4.17.1"
,
"mysql"
:
"^2.18.1"
...
...
Please
register
or
login
to post a comment