송민석

Test chatbot.js

<<<<<<< HEAD:chatbot.js
var express = require('express');
const request = require('request');
const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
......@@ -105,3 +106,34 @@ try {
console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
console.log(error);
}
=======
const config =require('./config')
const mongoose = require("mongoose");
const connect = mongoose.connect(config.url,
{
useNewUrlParser: true,
useUnifiedTopology: true,
})
.then(() => console.log("DB : Succesfully Connected"))
.catch((err) => console.log(err.message));
/*
const { MongoClient } = require("mongodb");
const config =require('./config')
const client = new MongoClient(config.url);
async function run() {
try {
await client.connect();
console.log("Connected correctly to server");
} catch (err) {
console.log(err.stack);
}
finally {
await client.close();
}
}
run().catch(console.dir);
*/
>>>>>>> 86b0ca0 (Modify index.js file):index.js
......