// Import Libraries
require('dotenv').config()
const express = require('express');
// Define Logger Functions
const logger = require("./logger");
// Create Express instance
let app = express();
//  Initialize the body-parser option
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// CALL MIDDLEWARES
// Require & Import Api Routes
const apiEndpoint = require("./routes/api");
// USE Api Routes as Middlewares
app.use(apiEndpoint);
const SERVER_PORT = process.env.NODE_PORT || 8850;
app.listen(SERVER_PORT, () => {
  logger.info(`Server Listening on Port : ${SERVER_PORT}`);
});

