{"size": 1075, "ext": "js", "max_stars_repo_path": "app.js", "max_stars_repo_name": "srijondasgit/elearning-core", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app.js", "max_issues_repo_name": "srijondasgit/elearning-core", "max_issues_repo_issues_event_min_datetime": "2021-09-19T16:45:56.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-19T16:45:56.000Z", "max_forks_repo_path": "app.js", "max_forks_repo_name": "srijondasgit/elearning-core", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 24.4318181818, "max_line_length": 66, "alphanum_fraction": 0.6762790698}
const express = require('express');
const mongoose = require('mongoose');
const app = express();
const bodyParser = require('body-parser')
const exphbs = require('express-handlebars')
const nodemailer = require('nodemailer')
require('dotenv/config');



//connect to db
mongoose.connect(process.env.DB_CONNECTION, {
    useNewUrlParser: true,
    useUnifiedTopology: true
  }, (err) => {
    if (!err) {
      console.log('MongoDB Connection Succeeded.');
    } else {
      console.log('Error in DB connection : ' + err);
    }
  });

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json())

const schoolRoutes = require('./routes/school');
app.use('/school', schoolRoutes);

const boardRoutes = require('./routes/board');
app.use('/board', boardRoutes);

const authRoutes = require('./routes/auth');
app.use('/auth', authRoutes);

//Routes
app.get('/',(req,res)=> {
    res.send('We are at Home directory')
})

console.log('application startup complete')

// How to start listening
app.listen(3001, () => console.log('Restarting node server ...'));
