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-05-09 03:18:33 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
435efead309c24ed400c2af1e8425f00ffc01810
435efead
1 parent
920771b8
style. console color and code changed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
server/index.js
server/src/lib/UpdatingMedicineInfo.js
server/index.js
View file @
435efea
...
...
@@ -19,7 +19,7 @@ Mongoose.connect(MONGO_URL, {
useUnifiedTopology
:
true
,
useCreateIndex
:
true
}).
then
(()
=>
{
console
.
log
(
'
Mongo DB is connected : '
,
MONGO_URL
);
console
.
log
(
'
\x1b[1;32mMongo DB is connected : '
,
MONGO_URL
,
'\x1b[0m'
);
updateMedicineInfo
.
updateMedicineInfo
();
}).
catch
(
e
=>
{
console
.
log
(
e
);
...
...
@@ -30,5 +30,5 @@ router.use('/api', api.routes());
app
.
use
(
router
.
routes
()).
use
(
router
.
allowedMethods
());
app
.
listen
(
SERVER_PORT
,
()
=>
{
console
.
log
(
'
PORT : '
,
SERVER_PORT
,
'is connected
'
);
console
.
log
(
'
\x1b[1;36mPORT : '
,
SERVER_PORT
,
'is connected\x1b[0m
'
);
})
\ No newline at end of file
...
...
server/src/lib/UpdatingMedicineInfo.js
View file @
435efea
...
...
@@ -5,7 +5,7 @@ exports.updateMedicineInfo = async() => {
const
itemArray
=
await
getItemsList
(
getQueryURL
);
await
exportJsonData
(
itemArray
);
console
.
log
(
'
All of data is updated!
'
);
console
.
log
(
'
\x1b[1;35mAll of data is updated!\x1b[0m
'
);
}
//queryUrl을 return하는 함수 : 한 페이지에 100개의 item씩 요청할 수 있다.
...
...
@@ -32,7 +32,7 @@ const getItemsList = async(queryUrl) => {
return
result
;
result
.
push
(...
items
);
console
.
log
(
'
medicine data getting processing... : page'
,
i
,
'done
'
);
console
.
log
(
'
\x1b[100mmedicine data getting processing... : page'
,
i
,
'done\x1b[0m
'
);
i
++
;
}
}
...
...
Please
register
or
login
to post a comment