김연준

Erasing mongoose after failing /change of slight needed codes

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