박권수

style. console color and code changed

...@@ -19,7 +19,7 @@ Mongoose.connect(MONGO_URL, { ...@@ -19,7 +19,7 @@ Mongoose.connect(MONGO_URL, {
19 useUnifiedTopology: true, 19 useUnifiedTopology: true,
20 useCreateIndex : true 20 useCreateIndex : true
21 }).then(() => { 21 }).then(() => {
22 - console.log('Mongo DB is connected : ', MONGO_URL); 22 + console.log('\x1b[1;32mMongo DB is connected : ', MONGO_URL, '\x1b[0m');
23 updateMedicineInfo.updateMedicineInfo(); 23 updateMedicineInfo.updateMedicineInfo();
24 }).catch(e => { 24 }).catch(e => {
25 console.log(e); 25 console.log(e);
...@@ -30,5 +30,5 @@ router.use('/api', api.routes()); ...@@ -30,5 +30,5 @@ router.use('/api', api.routes());
30 app.use(router.routes()).use(router.allowedMethods()); 30 app.use(router.routes()).use(router.allowedMethods());
31 31
32 app.listen(SERVER_PORT, () => { 32 app.listen(SERVER_PORT, () => {
33 - console.log('PORT : ', SERVER_PORT, 'is connected'); 33 + console.log('\x1b[1;36mPORT : ', SERVER_PORT, 'is connected\x1b[0m');
34 }) 34 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,7 +5,7 @@ exports.updateMedicineInfo = async() => { ...@@ -5,7 +5,7 @@ exports.updateMedicineInfo = async() => {
5 const itemArray = await getItemsList(getQueryURL); 5 const itemArray = await getItemsList(getQueryURL);
6 await exportJsonData(itemArray); 6 await exportJsonData(itemArray);
7 7
8 - console.log('All of data is updated!'); 8 + console.log('\x1b[1;35mAll of data is updated!\x1b[0m');
9 } 9 }
10 10
11 //queryUrl을 return하는 함수 : 한 페이지에 100개의 item씩 요청할 수 있다. 11 //queryUrl을 return하는 함수 : 한 페이지에 100개의 item씩 요청할 수 있다.
...@@ -32,7 +32,7 @@ const getItemsList = async(queryUrl) => { ...@@ -32,7 +32,7 @@ const getItemsList = async(queryUrl) => {
32 return result; 32 return result;
33 33
34 result.push(...items); 34 result.push(...items);
35 - console.log('medicine data getting processing... : page', i, 'done'); 35 + console.log('\x1b[100mmedicine data getting processing... : page', i, 'done\x1b[0m');
36 i++; 36 i++;
37 } 37 }
38 } 38 }
......