Skip to content

Commit

Permalink
color
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsht0001 committed Jul 12, 2023
1 parent 514681a commit 99f1594
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,29 @@ var logger = require("morgan");
var hbs = require("hbs");
var session = require("express-session");
const nocache = require("nocache");

colors = require("colors");

var db = require("./config/connection");
// declaring partials path
var pathpartial = path.join(__dirname, "views/partials");
// requiring routers
var adminRouter = require("./routes/admin")
var usersRouter = require("./routes/users")
var categoryRouter = require("./routes/category")
var adminRouter = require("./routes/admin");
var usersRouter = require("./routes/users");
var categoryRouter = require("./routes/category");

var app = express();

// view engine setup
app.set("views", path.join(__dirname, "views"));
app.set("view engine", "hbs");


// hbs partial setup
hbs.registerPartials(pathpartial);
// inc helper for +1 index in tables
hbs.registerHelper("inc", function (value, options) {
return parseInt(value) + 1;
});


// cache control middleware
app.use(nocache());

Expand Down Expand Up @@ -60,7 +58,7 @@ db.connect((err) => {
if (err) {
console.log("connection error" + err);
} else {
console.log("db connected");
console.log("db connected".rainbow);
}
});

Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dependencies": {
"bcrypt": "^5.1.0",
"bootstrap-icons": "^1.9.1",
"colors": "^1.4.0",
"cookie-parser": "~1.4.4",
"datatables": "^1.10.18",
"debug": "~2.6.9",
Expand Down

0 comments on commit 99f1594

Please sign in to comment.