Toggle navigation
Toggle navigation
This project
Loading...
Sign in
I_Jemin
/
Node-Study
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
I_Jemin
2018-03-23 20:20:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1f5b74c4f308960278ae54c7d1ea48ac964b5a10
1f5b74c4
1 parent
2b946b28
Make Web Server path with Express
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
express-demo/index.js
express-demo/index.js
0 → 100644
View file @
1f5b74c
const
express
=
require
(
'express'
);
const
app
=
express
();
// Corespond to HTTP
// app.get()
// app.post()
// app.put();
// app.delete()
app
.
get
(
'/'
,(
req
,
res
)
=>
{
res
.
send
(
'Hello World'
);
});
app
.
get
(
'/api/courses'
,(
req
,
res
)
=>
{
res
.
send
([
1
,
2
,
3
]);
});
app
.
listen
(
3000
,
()
=>
console
.
log
(
"Listening on port 3000"
));
Please
register
or
login
to post a comment