Toggle navigation
Toggle navigation
This project
Loading...
Sign in
임태민
/
Mapmory
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
임태민
2021-05-09 15:59:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
36f3e637cf1ad2f53c3b8d4f82c986bb6e6cfd6c
36f3e637
1 parent
c5df8d33
Update app.js
- check the url mapping
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
Mapmory/app.js
Mapmory/package-lock.json
Mapmory/package.json
Mapmory/app.js
View file @
36f3e63
const
express
=
require
(
'express'
);
const
bodyParser
=
require
(
'body-parser'
);
const
session
=
require
(
'express-session'
);
const
app
=
express
();
app
.
use
(
bodyParser
.
json
());
...
...
@@ -16,40 +16,48 @@ app.use(session({
app
.
get
(
'/'
,
function
(
req
,
res
){
res
.
send
(
"Home page"
);
})
//login
app
.
put
(
'/login'
,
function
(
req
,
res
){
res
.
send
(
"Login page"
);
})
//logout
app
.
put
(
'/logout'
,
function
(
req
,
res
){
res
.
send
(
"Logout page"
);
})
//register
app
.
post
(
'/register'
,
function
(
req
,
res
){
res
.
send
(
'
r
egister page'
);
res
.
send
(
'
R
egister page'
);
})
//Mapmain
app
.
get
(
'/Mapmain'
,
function
(
req
,
res
){
res
.
send
(
'Mapmain page'
);
})
//Read post
app
.
get
(
'/Mapmain/posts/:postId'
,
function
(
req
,
res
){
var
postId
=
req
.
params
.
postId
;
res
.
send
(
"Mapmain post page
"
,
postId
);
res
.
send
(
"Mapmain post page
"
+
postId
);
})
//Create post
app
.
post
(
'/Mapmain/posts'
,
function
(
req
,
res
){
res
.
send
(
"Mapmain create page"
);
})
//Update post
app
.
put
(
'/Mapmain/posts/:postId'
,
function
(
req
,
res
){
var
postId
=
req
.
params
.
postId
;
res
.
send
(
"Mapmain update page
"
);
res
.
send
(
"Mapmain update page
"
+
postId
);
})
//Delete post
app
.
delete
(
'/Mapmain/posts/:postId'
,
function
(
req
,
res
){
var
postId
=
req
.
params
.
postId
;
res
.
send
(
"Mapmain
update page"
);
res
.
send
(
"Mapmain
delete page "
+
postId
);
})
//Mapmain/category/:_category
//Mapmain/post/:_pk
...
...
Mapmory/package-lock.json
View file @
36f3e63
This diff is collapsed. Click to expand it.
Mapmory/package.json
View file @
36f3e63
{
"name"
:
"
m
apmory"
,
"name"
:
"
M
apmory"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"main"
:
"app.js"
,
...
...
@@ -12,6 +12,7 @@
"body-parser"
:
"^1.19.0"
,
"express"
:
"^4.17.1"
,
"express-session"
:
"^1.17.1"
,
"mysql"
:
"^2.18.1"
"mysql"
:
"^2.18.1"
,
"package.json"
:
"^2.0.1"
}
}
...
...
Please
register
or
login
to post a comment