{"size": 732, "ext": "js", "max_stars_repo_path": "Back-End/NodeJs/Practice-Projects/MovieFlix/index.js", "max_stars_repo_name": "Neeteshking21/Full-Stack-Development-Learning-Path", "max_stars_repo_stars_event_min_datetime": "2021-05-12T08:29:27.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-15T21:22:20.000Z", "max_issues_repo_path": "Back-End/NodeJs/Practice-Projects/MovieFlix/index.js", "max_issues_repo_name": "Neeteshking21/Full-Stack-Development-Learning-Path", "max_issues_repo_issues_event_min_datetime": "2021-04-23T09:39:47.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T18:49:54.000Z", "max_forks_repo_path": "Back-End/NodeJs/Practice-Projects/MovieFlix/index.js", "max_forks_repo_name": "Neeteshking21/Full-Stack-Development-Learning-Path", "max_forks_repo_forks_event_min_datetime": "2021-04-27T06:56:58.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-19T19:04:42.000Z"}
{"max_stars_count": 64, "max_issues_count": 77, "max_forks_count": 30, "avg_line_length": 27.1111111111, "max_line_length": 71, "alphanum_fraction": 0.6762295082}
//Importing the required modules
const express = require('express');
const path = require('path');
const exphbs  = require('express-handlebars');

//Creating a application using express
const app = express();

//Configuring the template engine and setting it up
app.engine('.hbs', exphbs({extname: '.hbs'}));
app.set('view engine', '.hbs');

//Specifing port to listen on
const port = 3000;

//Creating the endpoints
// app.get('/', (req, res) => {
//     console.log('Hey / endpoint is hit');
// });

//Using the endpoints from the routes
app.use('/', require(path.join(__dirname, './routes/movieServer.js')));

//Listening to specific port
app.listen(port, () => {
    console.log(`Server started on http://localhost:${port}`);
})