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
JaeHyeok Song
2020-12-06 01:56:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38b2fea268bc43d5bb5329c1f6151552ed3eaa17
38b2fea2
1 parent
f2cc89fa
add cors module
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletions
jaksimsamil-server/index.js
jaksimsamil-server/package-lock.json
jaksimsamil-server/package.json
jaksimsamil-server/index.js
View file @
38b2fea
...
...
@@ -6,7 +6,7 @@ const fs = require("fs");
const
morgan
=
require
(
"koa-morgan"
);
const
jwtMiddleware
=
require
(
"./src/lib/jwtMiddleware"
);
const
api
=
require
(
"./src/api"
);
const
cors
=
require
(
'@koa/cors'
);
// for fix CORS Error
require
(
"dotenv"
).
config
();
const
app
=
new
Koa
();
...
...
@@ -15,6 +15,7 @@ const accessLogStream = fs.createWriteStream(__dirname + "/access.log", {
flags
:
"a"
,
});
require
(
"dotenv"
).
config
();
app
.
use
(
cors
());
app
.
use
(
bodyParser
());
app
.
use
(
jwtMiddleware
);
app
.
use
(
morgan
(
"combined"
,
{
stream
:
accessLogStream
}));
...
...
jaksimsamil-server/package-lock.json
View file @
38b2fea
...
...
@@ -146,6 +146,14 @@
"to-fast-properties"
:
"^2.0.0"
}
},
"@koa/cors"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/@koa/cors/-/cors-3.1.0.tgz"
,
"integrity"
:
"sha512-7ulRC1da/rBa6kj6P4g2aJfnET3z8Uf3SWu60cjbtxTA5g8lxRdX/Bd2P92EagGwwAhANeNw8T8if99rJliR6Q=="
,
"requires"
:
{
"vary"
:
"^1.1.2"
}
},
"@sindresorhus/is"
:
{
"version"
:
"0.14.0"
,
"resolved"
:
"https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz"
,
...
...
@@ -826,6 +834,15 @@
"resolved"
:
"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
,
"integrity"
:
"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cors"
:
{
"version"
:
"2.8.5"
,
"resolved"
:
"https://registry.npmjs.org/cors/-/cors-2.8.5.tgz"
,
"integrity"
:
"sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g=="
,
"requires"
:
{
"object-assign"
:
"^4"
,
"vary"
:
"^1"
}
},
"cron-parser"
:
{
"version"
:
"2.15.0"
,
"resolved"
:
"https://registry.npmjs.org/cron-parser/-/cron-parser-2.15.0.tgz"
,
...
...
jaksimsamil-server/package.json
View file @
38b2fea
...
...
@@ -4,11 +4,13 @@
"main"
:
"index.js"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"@koa/cors"
:
"^3.1.0"
,
"axios"
:
"^0.19.2"
,
"bcrypt"
:
"^4.0.1"
,
"body-parser"
:
"^1.19.0"
,
"cheerio"
:
"^1.0.0-rc.3"
,
"cookie-parser"
:
"^1.4.5"
,
"cors"
:
"^2.8.5"
,
"dotenv"
:
"^8.2.0"
,
"eslint-config-prettier"
:
"^6.11.0"
,
"fs"
:
"^0.0.1-security"
,
...
...
Please
register
or
login
to post a comment