Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
821ed7a
Change root route to redirect to '/listings'
knockknock10 Jan 10, 2026
b1be962
Fixed the allowded format
Jan 12, 2026
d71c084
Merge pull request #1 from knockknock10/fix
knockknock10 Jan 12, 2026
0bbbf51
Changed the title
Jan 12, 2026
97bc521
Merge pull request #2 from knockknock10/fix
knockknock10 Jan 12, 2026
302a202
UI improved of Login and signup
Jan 13, 2026
cebf39a
Merge pull request #3 from knockknock10/fix
knockknock10 Jan 13, 2026
d0180a4
Add GitHub Actions workflow for NodeJS with Webpack
knockknock10 Jan 13, 2026
ce10f07
Delete .github/workflows directory
knockknock10 Jan 13, 2026
d4c7252
Google Ads
Jan 13, 2026
cf7be01
Merge pull request #4 from knockknock10/fix
knockknock10 Jan 13, 2026
bd6ea42
For Privacy/terms/contact
Jan 13, 2026
03b191b
Routes for Privacy/terms/contact
Jan 13, 2026
91095c1
Merge pull request #5 from knockknock10/fix
knockknock10 Jan 13, 2026
66a9707
Merge pull request #6 from knockknock10/fix
knockknock10 Jan 13, 2026
d928a72
Links
Jan 13, 2026
76e4e1a
Merge pull request #7 from knockknock10/fix
knockknock10 Jan 13, 2026
29a794e
Fixed the pages
Jan 13, 2026
9134b9b
Merge branch 'main' into fix
knockknock10 Jan 13, 2026
87ce750
Merge pull request #8 from knockknock10/fix
knockknock10 Jan 13, 2026
547f5da
Merge pull request #9 from knockknock10/main
knockknock10 Jan 13, 2026
6dfe55f
all
Jan 13, 2026
eb566dd
a
Jan 13, 2026
4c10dfb
Resolving the dependencies error
knockknock10 Mar 5, 2026
59c1873
Add mongodb v4 for connect-mongo compatibility
knockknock10 Mar 5, 2026
08e94a1
Merge main into fix and resolve package file conflicts
Copilot Apr 16, 2026
0edff83
Improve README context for deployed app link
Copilot Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
Empty file modified .vscode/settings.json
100644 → 100755
Empty file.
Empty file modified Expresserr.js
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Live Application

Visit the deployed Wandera app at:
https://wandera-bncl.onrender.com/listings
23 changes: 12 additions & 11 deletions app.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const path = require("path");
const methodOverride = require("method-override");
const ejsMate = require("ejs-mate");
const wrapAsync = require("./utils/wrapAsync.js");
// const { wrap } = require("module"); // not required
// const { wrap } = require("module");
const ExpressError = require("./utils/ExpressError.js");
const session = require("express-session");
const MongoStore = require("connect-mongo");
Expand All @@ -22,6 +22,7 @@ const User = require("./models/user.js");
const listingRouter = require("./routes/listing.js");
const reviewsRouter = require("./routes/reviews.js");
const userRouter = require("./routes/user.js");
const staticRoutes = require("./routes/static");

app.use(express.urlencoded({ extended: true }));
app.use(methodOverride("_method"));
Expand All @@ -34,8 +35,7 @@ app.use(express.static(path.join(__dirname, "/public")));

// Database
//const Mongo_url = "mongodb://127.0.0.1:27017/wanderlust";
const dburl = process.env.ATLASTDB_URL || "mongodb://127.0.0.1:27017/wanderlust";

const dburl = process.env.ATLASTDB_URL
main()
.then(() => {
console.log("Connected to DB");
Expand All @@ -51,9 +51,9 @@ async function main() {

const store = MongoStore.create({
mongoUrl: dburl,
crypto: {
secret: process.env.SECRET,
},
// crypto: {
// secret: process.env.SECRET,
// },
touchAfter: 24 * 3600,
});

Expand Down Expand Up @@ -103,13 +103,13 @@ app.use((req, res, next) => {
// Routes
app.use("/listings", listingRouter);
app.use("/listings/:id/reviews", reviewsRouter);
app.use("/", staticRoutes);
app.use("/", userRouter);



// app.get("/", (req, res) => {
// res.send("hi i am Root");
// });
app.get("/", (req, res) => {
res.redirect("/listings");
});

// error handling
app.all(/.*/, (req, res, next) => {
Expand All @@ -122,9 +122,10 @@ app.use((err, req, res, next) => {
}
let { statusCode = 500, message = "Something Went Wrong" } = err;
res.status(statusCode).render("error.ejs", { message, err });
next();
});

// server
app.listen(8080, () => {
console.log("Server is listening to Port 8080");
});
});
2 changes: 1 addition & 1 deletion cloudconfig.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const storage = new CloudinaryStorage({
cloudinary: cloudinary,
params: {
folder: 'proj_dev',
allowdFormats: ["png","jpg","jpeg"], // supports promises as well
allowedFormats: ["png","jpg","jpeg"], // supports promises as well

},
});
Expand Down
Empty file modified controllers/listings.js
100644 → 100755
Empty file.
Empty file modified controllers/review.js
100644 → 100755
Empty file.
Empty file modified controllers/users.js
100644 → 100755
Empty file.
Empty file modified expresrouter/routes/post.js
100644 → 100755
Empty file.
Empty file modified expresrouter/routes/user.js
100644 → 100755
Empty file.
Empty file modified expresrouter/server.js
100644 → 100755
Empty file.
Empty file modified expresrouter/views/hello.ejs
100644 → 100755
Empty file.
Empty file modified init/data.js
100644 → 100755
Empty file.
Empty file modified init/index.js
100644 → 100755
Empty file.
Empty file modified middleware.js
100644 → 100755
Empty file.
Empty file modified models/listing.js
100644 → 100755
Empty file.
Empty file modified models/review.js
100644 → 100755
Empty file.
Empty file modified models/user.js
100644 → 100755
Empty file.
Loading