Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김지훈
/
3line
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
2
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김지훈
2016-11-12 22:43:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3a38f5d06219da65d240f62fa90870397d29781c
3a38f5d0
1 parent
64ed328e
Add : cars module
다른 도메인에서 접근 가능하도록 처리함. 임시.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
Server/app.js
Server/package.json
Server/app.js
View file @
3a38f5d
...
...
@@ -4,7 +4,7 @@ var favicon = require('serve-favicon');
var
logger
=
require
(
'morgan'
);
var
cookieParser
=
require
(
'cookie-parser'
);
var
bodyParser
=
require
(
'body-parser'
);
var
cors
=
require
(
'cors'
);
var
routes
=
require
(
'./routes/index'
);
var
users
=
require
(
'./routes/users'
);
...
...
@@ -17,6 +17,7 @@ app.set('view engine', 'jade');
// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app
.
use
(
logger
(
'dev'
));
app
.
use
(
cors
());
app
.
use
(
bodyParser
.
json
());
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
app
.
use
(
cookieParser
());
...
...
@@ -56,8 +57,8 @@ app.use(function(err, req, res, next) {
});
});
app
.
listen
(
process
.
env
.
PORT
||
3
000
,
function
(){
console
.
log
(
"Server is running at
3
000"
);
app
.
listen
(
process
.
env
.
PORT
||
4
000
,
function
(){
console
.
log
(
"Server is running at
4
000"
);
});
module
.
exports
=
app
;
...
...
Server/package.json
View file @
3a38f5d
...
...
@@ -9,6 +9,7 @@
"async"
:
"^2.1.2"
,
"body-parser"
:
"~1.15.1"
,
"cookie-parser"
:
"~1.4.3"
,
"cors"
:
"^2.8.1"
,
"debug"
:
"~2.2.0"
,
"express"
:
"~4.13.4"
,
"jade"
:
"~1.11.0"
,
...
...
Please
register
or
login
to post a comment