Toggle navigation
Toggle navigation
This project
Loading...
Sign in
고다경
/
Open_Source_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
김태희
2019-06-06 18:33:59 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02e35abf500d4f305e1f1805282e862b4c92c7bc
02e35abf
1 parent
022d0ddc
추가 삭제
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
server.js
server.js
deleted
100644 → 0
View file @
022d0dd
var
express
=
require
(
"express"
);
var
login
=
require
(
'./routes/loginroutes'
);
var
bodyParser
=
require
(
'body-parser'
);
var
app
=
express
();
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
true
})
);
app
.
use
(
bodyParser
.
json
()
);
app
.
use
(
function
(
req
,
res
,
next
)
{
res
.
header
(
"Access-Control-Allow-Origin"
,
"*"
);
res
.
header
(
"Access-Control-Allow-Headers"
,
"Origin, X-Requested-With, Content-Type, Accept"
);
next
();
});
var
router
=
express
.
Router
();
// test route
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
json
({
message
:
'welcome to our upload module apis'
});
});
// route to handle user registration
router
.
post
(
'/register'
,
login
.
register
);
router
.
post
(
'/login'
,
login
.
login
)
app
.
use
(
'/api'
,
router
);
app
.
listen
(
5000
);
Please
register
or
login
to post a comment