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
송효섭
2020-12-03 14:18:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5f7e8af7efb394ff48eb4a1230e7a6c7b6f6763a
5f7e8af7
1 parent
68c8e087
기본 Node 서버 구성
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
app.js
app.js
0 → 100644
View file @
5f7e8af
const
express
=
require
(
'express'
);
const
path
=
require
(
'path'
);
const
app
=
express
();
//디폴트 포트 값 : 8000
app
.
set
(
'port'
,
process
.
env
.
PORT
||
8000
);
app
.
get
(
'/'
,
(
req
,
res
)
=>
{
//res.send('Server is working');
res
.
sendFile
(
path
.
join
(
__dirname
,
'/main.html'
));
console
.
log
(
app
.
get
(
'port'
),
'번 포트 대기 중'
);
});
app
.
get
(
'/login'
,
(
req
,
res
)
=>
{
res
.
send
(
'로그인 페이지 : 로그인 방법 구상 하고 html 및 사이트 가져오기'
);
console
.
log
(
'로그인 페이지 오픈 시도됨.'
);
});
app
.
listen
(
app
.
get
(
'port'
),
()
=>
{
console
.
log
(
`Server is running at
${
app
.
get
(
'port'
)}
`
);
});
\ No newline at end of file
Please
register
or
login
to post a comment