Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이해님
/
term-project
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
Yulim KIM
2020-12-07 00:59:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5df625c546f238402d3042a9293caa1767fd9cf6
5df625c5
1 parent
2ec9d562
modified
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
server.js
server.js
View file @
5df625c
...
...
@@ -7,9 +7,14 @@ app.set('views', __dirname + '/views'); //서버가 읽을 수 있도록 HTML
app
.
set
(
'view engine'
,
'ejs'
);
//서버가 HTML 렌더링을 할 때, EJS 엔진을 사용하도록 설정합니다.
app
.
engine
(
'html'
,
require
(
'ejs'
).
renderFile
);
app
.
get
(
'/timeline/:screen_name'
,
tweetsController
.
getUserTweets
);
// '/timeline/:screen_name'형식의 url이 들어오면 뒤의 함수를 실행시킴
app
.
get
(
'/timeline/:screen_name'
,
tweetsController
.
getUserSearch
);
//url들어오면 뒤의 함수 실행
app
.
get
(
'/timeline/:screen_name'
,
tweetsController
.
getUserRetweet
);
//'/timeline/:screen_name'형식의 url이 들어오면 뒤의 함수를 실행시킴
//인기있는 게시물
app
.
get
(
'/popular/:screen_name'
,
tweetsController
.
getUserRetweet
);
//'/timeline/:screen_name'형식의 url이 들어오면 뒤의 함수를 실행시킴
var
server
=
app
.
listen
(
3000
,
function
(){
//3000 포트 사용
...
...
Please
register
or
login
to post a comment