maryamaljanabi / bestbags-nodejs-ecommerce Goto Github PK
View Code? Open in Web Editor NEWA responsive ecommerce website using Node js, Express js, and MongoDB
Home Page: https://best-bags.herokuapp.com/
A responsive ecommerce website using Node js, Express js, and MongoDB
Home Page: https://best-bags.herokuapp.com/
TypeError: C:\Users\vaish\bestbags-nodejs-ecommerce\views\shop\home.ejs:52
50| <% for(let i=0; i<3; i++){ %>
51|
52|
53|
54|<%=categories[i].title%>
55|
Cannot read property 'slug' of undefined
at eval (eval at compile (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:633:12), :109:39)
at returnedFn (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:668:17)
at tryHandleCache (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:254:36)
at View.exports.renderFile [as engine] (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:485:10)
at View.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\response.js:1008:7)
at C:\Users\vaish\bestbags-nodejs-ecommerce\routes\index.js:20:9
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Hi,
I check this eCommerce code but here some issues coming so you need to describe proper installation guide also so that anybody can setup it on his local system easily and can contribute for this code.
Thanks
How to open the admin panel
Can you please provide a bit brief on how to create .env file and connect mongo db.. if there is any sample.
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
Hi, so I connected the app to azure cosmos DB NodeJS API. AdminBro works alright but I whenever I try to access the front page I get the following error.
GET / 302 685.380 ms - 46
MongoError: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]}
ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df, Request URI: /apps/a4038f59-dbab-454f-982e-c3c4ff0515f8/services/302463b7-7d21-4aa9-8c6a-1e7f8bc1c398/partitions/53e82a5d-f5cc-472f-83ae-6e4712cf3538/replicas/132878310044987400s/, RequestStats: Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, SDK: Windows/10.0.19041 cosmos-netstandard-sdk/3.18.0);););
at MessageStream.messageHandler (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\connection.js:299:20)
at MessageStream.emit (node:events:390:28)
at processIncomingData (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
at MessageStream._write (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at MessageStream.Writable.write (node:internal/streams/writable:334:10)
at TLSSocket.ondata (node:internal/streams/readable:754:22)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23) {
ok: 0,
code: 2,
codeName: 'BadValue'
}
GET / 302 630.101 ms - 46
Hi! @maryamaljanabi I want to change dateformat as 'yyyy/mm/dd' but I couldnt find where I have to do this changing. Could you help me please!
The schemas have a good representation, but the "_id" field isn't there(I know that "_id" field is automatically created by MongoDB ). It is important to have a full description of your schemas even if the field it's not fully explicit, in case anyone wants to have an overview about the project.
Hey there!
I belong to an open source security research community, and a member (@ktg9) has found an issue, but doesn’t know the best way to disclose it.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
AT WHICH PORT NUMBER DOESIT RUN ?
I've been playing around with this for a few days now, I was wondering how I would go about removing faker and replacing with real products to down the line have on a live site.
run node product-seed.js the file name is actually products-seed.js
Hi! @maryamaljanabi I can sign up succesfully but after sign in ,right up corner Icant see user name and cant add product to cart one more thing when I try to sign in I tried wrong email and password it dont show error messages
Thanks for help!
Hi, thanks for sharing the source code. I can see a CSRF prevention set up for this, so do you use any other security solutions? Thanks.
Hi
How do i provide credentials in the .env file as my Mongo DB requires Authentication
Regards
Hi! @maryamaljanabi I want to do routing operation inside pages.js to app.js=>
but in app.js I cant use products it returns me this error
How can I fix it? is it possible to route app.js?
Hi! when I start the app with npm start it returns me that and not upload the website
express-session deprecated undefined resave option; provide resave option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated req.secret; provide secret option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated req.secret; provide secret option app.js:34:3
how can I fix it?
Hi @maryamaljanabi I created a notice module for carousel, first created model file and then created notices.js in routes directory I want to use variable that returns from notices.js file in home.ejs but it returns me error when I use variable
here is my code and error message thanks for help
I'm getting this error in home.ejs. How can I solve it?
TypeError: C:\Users\vaish\bestbags-nodejs-ecommerce\views\shop\home.ejs:52
50| <% for(let i=0; i<3; i++){ %>
51| <div class="col-lg-3 col-md-3 col-sm-12 text-center ml-2">
>> 52| <a class="title-link" href="/products/<%=categories[i].slug%>">
53| <img src="images/dept<%=i%>.jpg" alt="category" class="circle-img" />
54| <h4 class="mb-3 mt-3"><%=categories[i].title%></h4>
55| </a>
Cannot read property 'slug' of undefined
at eval (eval at compile (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:633:12), <anonymous>:109:39)
at returnedFn (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:668:17)
at tryHandleCache (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:254:36)
at View.exports.renderFile [as engine] (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:485:10)
at View.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\response.js:1008:7)
at C:\Users\vaish\bestbags-nodejs-ecommerce\routes\index.js:20:9
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Hi again! @maryamaljanabi I created a file named .env at the root but when I want to use .env variables I cant. The other files dont see the variables. Where am I doing mistake
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.