Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-08-17 02:34:37 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
b4a9151c3d560b3707e28adabc17669b0cfef217
b4a9151c
2 parents
e6137b29
0656adb9
Merge branch 'server' into web
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
server/index.js
server/package.json
server/yarn.lock
server/index.js
View file @
b4a9151
const
Koa
=
require
(
'koa'
);
const
cors
=
require
(
'@koa/cors'
);
const
Router
=
require
(
'koa-router'
);
const
bodyparser
=
require
(
'koa-bodyparser'
);
...
...
@@ -29,6 +30,7 @@ Mongoose.connect(MONGO_URL, {
app
.
use
(
bodyparser
());
router
.
use
(
'/api'
,
api
.
routes
());
app
.
use
(
cors
());
app
.
use
(
router
.
routes
()).
use
(
router
.
allowedMethods
());
app
.
listen
(
SERVER_PORT
,
()
=>
{
...
...
server/package.json
View file @
b4a9151
...
...
@@ -17,6 +17,7 @@
"author"
:
"박권수"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"@koa/cors"
:
"^3.1.0"
,
"moment"
:
"^2.29.1"
,
"mqtt"
:
"^4.2.6"
},
...
...
server/yarn.lock
View file @
b4a9151
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment