<commit_before>// Dependencies
// =============================================================
var express = require("express");
var bodyParser = require("body-parser");
var handlebars = require("handlebars");
var exphbs = require("express-handlebars");
var methodOverride = require("method-override"); 


// Sets up the Express App
// =============================================================
var app = express();
var PORT = process.env.PORT || 8080;
app.use(methodOverride("_method")); 
// Set Handlebars as the default templating engine.

var hbs = exphbs.create({
	defaultLayout: "main",
	partialsDir: [ 
		"views/partials/"]
});

app.engine("handlebars", hbs.engine);
app.set("view engine", "handlebars");

app.use(express.static(__dirname + "/public")); 

// Requiring our models for syncing
var db = require("./models");

// Sets up the Express app to handle data parsing
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.text());
app.use(bodyParser.json({ type: "application/vnd.api+json" }));

// Routes 
// ============================================================

require("./routes/html-routes.js")(app);
require("./routes/api-routes.js")(app);

// Syncing our sequelize models and then starting our express app
db.sequelize.sync({force: true}).then(function() {
  app.listen(PORT, function() {
    console.log("App listening on PORT " + PORT);
  });<commit_msg>fixed bugs with sequelize and api routes<commit_after>// Dependencies
// =============================================================
var express = require("express");
var bodyParser = require("body-parser");
var handlebars = require("handlebars");
var exphbs = require("express-handlebars");
var methodOverride = require("method-override"); 


// Sets up the Express App
// =============================================================
var app = express();
var PORT = process.env.PORT || 8080;
app.use(methodOverride("_method")); 
// Set Handlebars as the default templating engine.

var hbs = exphbs.create({
	defaultLayout: "main",
	partialsDir: [ 
		"views/partials/"]
});

app.engine("handlebars", hbs.engine);
app.set("view engine", "handlebars");

app.use(express.static(__dirname + "/public")); 

// Requiring our models for syncing
var db = require("./models");

// Sets up the Express app to handle data parsing
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.text());
app.use(bodyParser.json({ type: "application/vnd.api+json" }));

// Routes 
// ============================================================

require("./routes/html-routes.js")(app);
require("./routes/api-routes.js")(app);

// Syncing our sequelize models and then starting our express app
db.sequelize.sync().then(function() {
  app.listen(PORT, function() {
    console.log("App listening on PORT " + PORT);
  });
{'fraction_non_alphanumeric': 0.2785118219749652, 'fraction_numerical': 0.0027816411682892906, 'mean_word_length': 5.47972972972973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4167254', 'n_tokens_mistral': 835, 'n_tokens_neox': 809, 'n_words': 201}