김연준

Erasing mongoose after failing /change of slight needed codes

...@@ -9,7 +9,7 @@ exports.startbot = ()=>{ ...@@ -9,7 +9,7 @@ exports.startbot = ()=>{
9 // Get authorization to use the slackbot 9 // Get authorization to use the slackbot
10 const bot = new SlackBot({ 10 const bot = new SlackBot({
11 //xoxb-582582124755-587875604934-gdWsVhzGXCze3mECWXpTsAP6 11 //xoxb-582582124755-587875604934-gdWsVhzGXCze3mECWXpTsAP6
12 - token : "", 12 + token : "xoxb-582582124755-587875604934-gdWsVhzGXCze3mECWXpTsAP6",
13 name : "Joker" 13 name : "Joker"
14 }); 14 });
15 15
......
...@@ -2,6 +2,7 @@ const MongoClient = require('mongodb').MongoClient; ...@@ -2,6 +2,7 @@ const MongoClient = require('mongodb').MongoClient;
2 const jokedoc = require('./joke_data/jokes.json'); 2 const jokedoc = require('./joke_data/jokes.json');
3 const dbname = 'jokeapi'; 3 const dbname = 'jokeapi';
4 const collec = 'jokes'; 4 const collec = 'jokes';
5 +const dboperation = require('./operations');
5 6
6 var url = "mongodb://localhost:27017/jokeapi"; 7 var url = "mongodb://localhost:27017/jokeapi";
7 8
......
1 const route = require('./Routers/route'); 1 const route = require('./Routers/route');
2 -const mongoose = require('mongoose');
3 //Before activating must connect to mongodb to interface 2 //Before activating must connect to mongodb to interface
4 //Connecting code [mongod --dbpath=data --bind_ip 127.0.0.1] at mongodb directory 3 //Connecting code [mongod --dbpath=data --bind_ip 127.0.0.1] at mongodb directory
5 -mongoose.connect('mongodb://27017/Joker', {useNewUrlParser: true})
6 -.then(()=>console.log('mongodb connected'))
7 -.catch(err => console.log(err));
8 4
9 route.startbot(); 5 route.startbot();
......