Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2_open_source_sw_development_Han
/
Jaksimsamil
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
송용우
2020-06-12 23:20:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02ae327992a392d0889c7170b213fce339923803
02ae3279
1 parent
664acc3e
Fixed index.js for Readability
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
jaksimsamil-server/index.js
jaksimsamil-server/index.js
View file @
02ae327
...
...
@@ -3,12 +3,16 @@ const Router = require("koa-router");
const
bodyParser
=
require
(
"koa-bodyparser"
);
const
mongoose
=
require
(
"mongoose"
);
const
jwtMiddleware
=
require
(
"./src/lib/jwtMiddleware"
);
const
api
=
require
(
"./src/api"
);
require
(
"dotenv"
).
config
();
const
app
=
new
Koa
();
const
router
=
new
Router
();
require
(
"dotenv"
).
config
();
app
.
use
(
bodyParser
());
app
.
use
(
jwtMiddleware
);
const
api
=
require
(
"./src/api"
);
const
{
SERVER_PORT
,
MONGO_URL
}
=
process
.
env
;
router
.
use
(
"/api"
,
api
.
routes
());
...
...
@@ -26,6 +30,7 @@ mongoose
.
catch
((
e
)
=>
{
console
.
log
(
e
);
});
app
.
listen
(
SERVER_PORT
,
()
=>
{
console
.
log
(
"Server is running on port"
,
process
.
env
.
SERVER_PORT
);
});
...
...
Please
register
or
login
to post a comment