feature/started work on layout.ejs

This commit is contained in:
Joaquin committed 2025-05-05 14:21:30 -07:00
1 parent d08fd30888
commit 4bcf8dd812
4 files changed
+27 -32

No files matched your search

+13 -13
View File
@@ -18,23 +18,23 @@ app.use(session({
}));
/*** Database ***/
const { connectMongo, getCollection } = require("./src/database/connection");
// const { connectMongo, getCollection } = require("./src/database/connection");
let users;
async function initDatabase() {
const mongoURI = process.env.mongoURI || "mongodb://localhost:27017/";
const database = process.env.database || "knoldus"; // Database name
// let users;
// async function initDatabase() {
// const mongoURI = process.env.mongoURI || "mongodb://localhost:27017/";
// const database = process.env.database || "knoldus"; // Database name
const db = await connectMongo(mongoURI, database);
// const db = await connectMongo(mongoURI, database);
// For any collection, init here
users = await getCollection(db, "users");
}
// // For any collection, init here
// users = await getCollection(db, "users");
// }
initDatabase().then(() => {
require("./src/auth/authentication")(app, users);
});
// initDatabase().then(() => {
// require("./src/auth/authentication")(app, users);
// });
/*
ROUTINGS
@@ -42,7 +42,7 @@ ROUTINGS
app.get('/', (req, res) => {
if (!req.session.errMessage) req.session.errMessage = "";
res.render('index');
res.render('layout');
});
app.get('/landing', (req, res) => {
+1 -14
View File
@@ -1,14 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
The Index page
</body>
</html>
<p>The index page</p>
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<title><%= title %></title>
</head>
<body>
<%- include(filename, locals) %>
</body>
</html>
-5
View File
@@ -6,11 +6,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup</title>
<link rel="stylesheet" href="/static/css/style.css" <link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>