I swear this tutorial is far better than the premium (paid) ones that we see on Udemy or other e-learning platform. You are so much knowledgeable about the topics that i'm just stunned . Big respect for you and thanks for changing the lives of thousands of software engineers by making them understand actually the core concepts.
Make sure you place the blogs/create GET route ABOVE the /blogs/:id GET route in the code. Otherwise express will fire the /blogs/:id handler for requests to /blogs/create.
@@ashishchourasia2830 what fix this for me was going back to index.ejs and on the tag make sure the href link has the same spacing with the ejs tags like in the video.
Loved the content. Gave me great learning over the weekend. I loved how he builds the pieces early on and how they all come together at the end to form an application. Not only gives you the details on how it can be done, but also why things are done the way they are done. Loved it. Huge thanks.
Shaun you are a legend. I am in the middle of an intensive assessment for a position currently and everytime I run into a problem, be it in Vue, node js or SQL you seomhow seem to have the answer at some corner or the internet. Keep up the amazing work!
Please make a react/node/SQL tutorial. I would love to see a complete fullstack project (ecommerce site perhaps). I would be more than happy to pay for a premium course. Thank you for the great content!
Nearing the end of the course now and have build the same project on my own computer along with you. Although I also watched the Mongodb course on Compass and used used compass instead of the cloud. I have to say your knowledge of the subject and your amazing ability to teach the subject line by line as you go absolutely blows my mind, I honest don't know how you do it. I don't think I know how to do ANYTHING as well as you do this. Thank you most sincerely.
Keep in mind that this is server side rending using EJS, nodejs render html to the browser, now React, Angular, Vue they have different approach, so you need to make http request from react to reach the routes in nodeJS, you also probably need set CORS on nodejs. Create nodejs Server with route and react app to call these route.
Maybe you might want to check out some videos on the topic from another coding guru: Part 1: ruclips.net/video/XuFDcZABiDQ/видео.html Part 2: ruclips.net/video/KyWaXA_NvT0/видео.html He also has MERN stack mini series which I found really useful. Though NetNinja's accent is 1000 times better so I'm also waiting for this tutorial
Was trying to do MERN stuff before really getting my node, express and mongodb core skills down. Realized I was just copying tutorials and not learning. I am gonna watch this whole series and learn a ton. Just from laying here watching this, I understood everything from past knowledge or just good JavaScript skills and it’s exciting because I’m really trying to learn fullstack development while also learning it in school academically. Thank you for all your videos brother !
Brilliant tutorial. I've learnt quite a lot from watching this. I would highly recommend all to watch this excellent informative and simple node.js crash course 😊🤝 You are a brilliant and exceptionally great teacher. Being able to convey your knowledge by explaining patiently.
If anyone getting undefined value in req.body for the post request , add the following before any route: app.use(express.urlencoded({extended: true})); app.use(express.json());
Great work as always Shaun, just completed your Udemy modern Javascript course a few days ago and then started this series, it's all coming together now. Would really like to see working with Postgresql sometime, I'm sure it's similar concepts to this though.
I buy a lot of course in UDEMY, and I didnt understand mostly, and when i found shaun channel i regret in buying these course. THis channel teach me everything... can you make a single tutorial about local storage? Thank you so much shaun..
This is well taught! It's very complex! Why? It seems PHP can do all this much easier and not as complex. It's feels like trying to reinvent the wheel. It may just be me......... I have learned a lot from Shaun on Udemy!
// If you get error around 19:11, which looks like this: CastError: Cast to ObjectId failed for value "style.css" (type string) at path "_id" for model "Blog" // Then simply remove from details.ejs // I don't understand why, but with only this: const id = req.params.id; console.log(id); // id looks fine, but when you add this below: Blog.findById(id) .then((result) => { res.render("details", { title: "Blog Details", blog: result }); }) .catch((err) => { console.log(err); }); // another id shows up in console: 6308f2bbcb373829482ab874 style.css // Is anyone able to explain this?
I used another way to delete a blog... 1- clicking on the delete link in the details screen. 2- it deletes the blog from database with "FindbyIdanddelete(id)". 3- redirect to the main page ('/blogs'). And it works, but I don't know if it is okay or not. May be there is a problem I didn't notice. Please tell me Shaun if there is any problem in this way.
Hi Shaun, again a great tutorial. Did you know about the express middleware "method-override", is is quite neat because it allows you to simulate DELETE and PUT requests using the normal form, with just a hidden field. Tis would simply things a great deal as you wouldn't need to use the JavaScript.
Greate videos (Thank you ) Sir, It can be also done by putting a (href) property in a(anchor tag)and set it value to '/blogs', without redirecting to the blogs page using JSON (lots of steps involves).
I am also a big fan of all of your courses. But I am not experienced and a little bit confused. After the Vue course I thought that the standard is to use frontend app in framework like VEU, and some backend app which REST API serving data in JSON format. After this course I am not sure, because there is a different solution. So which solution is better, and why. 1) Rest API with express.js and Mongo DB, and frontend application with VUE 2) Backend serving html pages with EJS view engine
I have a question about those dynamic routes like /blogs/:id . What happens if you past incorrect id? Then your code will try to find incorrect id in the DB and throw an error? And then you'd handle that error by redirecting to 404? Do I understand correctly? Coz I used to struggle with React Router while trying to implement routing only on the front end...
There was something which I was wondering when you create your request types : instead of using the name /blogs for a POST request, so the same as /blogs for a GET request, I assume that could you have picked any other term for this POST request instead and it would have worked without any problem?
so you can try to see if you can figure it out baed on the examples :). Not that hard with the GET & DELETE route examples. just use PUT the the applicable mongoose method. Best way to learn!
is there an example of making an update route path. I don't know if I am on the right track with the one I made. nevermind :D I just figured out how to do an update method for my crud application. also thank you for the course. You are literally one of my top sources to go to when I am interested in learning more for the frontend in my full stack journey.
Hey Shaun, how does node distinguish between /blogs/:id and /blogs/create request? Since id is not defined as an number, wouldn't it try to find blog with an ID of "create" and fail?
I just ran into this error and moving app.get('/blogs/create' ...) above both app.get('/blogs/:id' ...) and app.delete('/blogs/:id' ...) seems to fix it.
I've been stuck for almost a day on post request, didn't know what I was doing wrong and nothing seems to help with my problem. Came here and in less than 10 minutes you already saved me with the "express.urlencoded" tip, ty!
It's weird : In your tutorial, you write .then((response) => { response.json() }) to get the redirection attribute, but it doesn't work - my side -, if I don't return response.json(). Edit : apparently, it's because we use return only with curly brackets, otherwise we don't have to. Thanks for this really useful chapter.
For future people, why it doesn't work is: with curly brackets we need to write 'return response.json()' because otherwise the code doesn't return anything and the next then() doesn't receive any data. Without the curly brackets, JS assumes that respone.json() is the return value for the then method, and we get the 'data'
@23:31 can we not use href directly with the delete button providing the id in the url just like we did for the details page. that way we dont have to write evrything we wrote in the script tag??
How do we PUT, or otherwise edit and save an existing blog post? I have: * created an 'edit.ejs' based on 'create,' but with all textareas in the form. * put it in a sub dir to distinguish it from others for sake of the router. * added button to the details page that direct-links to edit.ejs: * used all textareas in form to get full, editable text back into form So the problem is that it currently creates a new, edited version of the original blog. What's the best way of getting it to update rather than create a new blog? Thanks!
this is so awesome. I have learned a lot. I still have trouble with the mongodb not picking up the posts. I had to comment out all the code that related to it since it was crashing the app.
Hi! I had to trim the id with the trim method to pass it to the Blog model, did i do something wrong or there was a change on how the string from mongoDB is returned?
When you did href="/styles.css" without the slash, everything works until you want the blog details...And then a GET /blogs/styles.css happens. When you miss the logged additional GET, you just wonder, how the following stack trace could happen 😅
Hi mate, How could I use the contents of a div with the contenteditable="true" instead of a textarea? I would like to put a WYSIWYG app in there, but it always crash. Cheers,
You keep mentioning that "this is asynchronous". How do you know when "something" is asynchronous or not? Is it documented somewhere? Also, you are using .then() syntax. How would you use async/await with this? Thanks
You can check the documentation to see if it's asynchronous or returns a promise. If you're using VS Code try and hover over it and see if it'll give you such information.
Hi, I am trying to get attribute values, when i tested it with console.log(req.body) it return title value, snippet value, but it didn't back with body value may I ask for help?
What I don't quite get is, when you deleted the post/thread, why did you send back to the client the place where they should be redirected and then, they get redirected clientside. Why not just redirect them serverside? Would the reason of redirecting them on the client realm have to do with the fact, no serverside validation is required? Thanks :)
Can I ask what theme of code is that you used? Your code color is much better than mine. I want to set it up like you ! e.g. it's only red highlight at the first "
Hey, I was having sort of an error when I defined the app.get('/blogs/:id') before app.get('/blogs/create') as for no reason it was treating 'create' as an id however it works when I define the blogs/create above.
@@parv69 I was having the same issue, and removing 'blogs' from endpoint solved it. It was trying to redirect to /blogs/blogs/asdfnasodifj so now I just have: const endpoint = `${trashcan.dataset.doc} and that fixed it for me, hope that helps!
Quick question: This is server side rendering, right? If I wanted to use this same project and use react, the only best thing that's going to help me is react router, right?
yeah, this is serverside rendering. you should probably make raw json responses instead of rendering and then using axios or some kind of https request module to connect the front-end with it
same, in the back of my head i'm just thinking, there has to be an easier way to do this with how far computing has come. taking notes and writing in the margins explaining what things do in your own words help
i get an error when i want to open create route after i have deleted all blogs ? at C:\Users\Fatma\Desktop odeJS ode_modules\express\lib outer\index.js:284:7 { messageFormat: undefined, stringValue: '"create"', kind: 'ObjectId', value: 'create', path: '_id', reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
I swear this tutorial is far better than the premium (paid) ones that we see on Udemy or other e-learning platform.
You are so much knowledgeable about the topics that i'm just stunned .
Big respect for you and thanks for changing the lives of thousands of software engineers by making them understand actually the core concepts.
exactly
no adds, no rubbish, just a nice london accent
could not agree more
and most importantly, straight to the point.
This is by far the best crash course ever, feels almost like the best premium course on nodejs. The style of teaching rocks!
Make sure you place the blogs/create GET route ABOVE the /blogs/:id GET route in the code. Otherwise express will fire the /blogs/:id handler for requests to /blogs/create.
Oh... I was stuck at this and it took my time.
Also, you've mentioned this stuff in your next video. :v
I am getting 'TypeError: Cannot read property 'id' of undefined' at the params line.
VS code wasn't showing the intellisense for it. Please help
@@ashishchourasia2830 what fix this for me was going back to index.ejs and on the tag make sure the href link has the same spacing with the ejs tags like in the video.
Thanks man, that's where it got stuck.
I dont get this. Can you explain a bit more please.
i feel butterflies in my stomach . the excitement of understanding the concept and yearning to apply it to a project is too much . Thanks ninja
This series on NodeJS is better than any other series/course on YoutTube or Udemy
best teacher everr!!! the thing is he also makes mistakes and corrects them which will make you familiar with these mistakes for easy debugging
Appreciate it :) thanks for watching
I just LOVE that moment when I need to pause the video to say: "Ahaaaaaaaaaaaaa, it's amazing!"
Thank you so much!!
best node course online from far. Amazing work!!
Thanks so much :)
Loved the content. Gave me great learning over the weekend. I loved how he builds the pieces early on and how they all come together at the end to form an application. Not only gives you the details on how it can be done, but also why things are done the way they are done. Loved it. Huge thanks.
That's awesome to hear :) thanks so much for watching
Shaun you are a legend. I am in the middle of an intensive assessment for a position currently and everytime I run into a problem, be it in Vue, node js or SQL you seomhow seem to have the answer at some corner or the internet. Keep up the amazing work!
Please make a react/node/SQL tutorial. I would love to see a complete fullstack project (ecommerce site perhaps). I would be more than happy to pay for a premium course.
Thank you for the great content!
Nearing the end of the course now and have build the same project on my own computer along with you. Although I also watched the Mongodb course on Compass and used used compass instead of the cloud. I have to say your knowledge of the subject and your amazing ability to teach the subject line by line as you go absolutely blows my mind, I honest don't know how you do it. I don't think I know how to do ANYTHING as well as you do this. Thank you most sincerely.
Even though these videos are long, there is not one second of fluff. Beautiful.
i like how structured this is, how every topic from #1 to #last builds so well onto each other.
Thanks :) that means a lot
Can you make a tutorial on how to connect a react component with node backend?
Yaa I also want 👍
Keep in mind that this is server side rending using EJS, nodejs render html to the browser, now React, Angular, Vue they have different approach, so you need to make http request from react to reach the routes in nodeJS, you also probably need set CORS on nodejs. Create nodejs Server with route and react app to call these route.
@@F4ILCON Sounds like you know what you're talking about. Can you make a quick video, please!
Maybe you might want to check out some videos on the topic from another coding guru:
Part 1: ruclips.net/video/XuFDcZABiDQ/видео.html
Part 2: ruclips.net/video/KyWaXA_NvT0/видео.html
He also has MERN stack mini series which I found really useful. Though NetNinja's accent is 1000 times better so I'm also waiting for this tutorial
Which Node features would you use if you had React already tho?
So much content in a single video! All the basics of CR(U)D, organised and explained very well! Many Thanks indeed!
Was trying to do MERN stuff before really getting my node, express and mongodb core skills down. Realized I was just copying tutorials and not learning.
I am gonna watch this whole series and learn a ton. Just from laying here watching this, I understood everything from past knowledge or just good JavaScript skills and it’s exciting because I’m really trying to learn fullstack development while also learning it in school academically.
Thank you for all your videos brother !
Brilliant tutorial. I've learnt quite a lot from watching this. I would highly recommend all to watch this excellent informative and simple node.js crash course 😊🤝
You are a brilliant and exceptionally great teacher. Being able to convey your knowledge by explaining patiently.
That means a lot, thank you so much :)
That feeling when you spend 2 hours reading tutorials that aren't helpful and then find that one video who helps you in less than 30 minutes:
I've recently started this tutorial series and I bet it's the most valuable tutorial even among the paid ones
Hope you're enjoying it :)
If anyone getting undefined value in req.body for the post request , add the following before any route:
app.use(express.urlencoded({extended: true}));
app.use(express.json());
@Ahmed Haron this comment should be pinned
@@vladdobritoiu4187yes should be pinned
pin this
ty sir
Great work as always Shaun, just completed your Udemy modern Javascript course a few days ago and then started this series, it's all coming together now. Would really like to see working with Postgresql sometime, I'm sure it's similar concepts to this though.
I buy a lot of course in UDEMY, and I didnt understand mostly, and when i found shaun channel i regret in buying these course. THis channel teach me everything... can you make a single tutorial about local storage?
Thank you so much shaun..
This is well taught! It's very complex! Why? It seems PHP can do all this much easier and not as complex. It's feels like trying to reinvent the wheel. It may just be me.........
I have learned a lot from Shaun on Udemy!
Totally agree. PHP is easier. But, Node.js is faster than PHP, and PHP is getting outdated, so I suggest sticking with Node.js.
Well, that's why you should create an Ajax Application. It ensures a complete separation of Client side code from Server-Side code. 🤷♂️
@netninja how excited you get when something works 😂👨💻 love it!!😂
Best ever tutorial. thank you Shaun Pelling. Huge contribution to learners!!!
Glad it was helpful! :)
Seriously do you think i need another course on nodejs, this your crash course is the premium course for me, thank you
😂😂this man is a legend ..am now a back end developer in one day guys
// If you get error around 19:11, which looks like this:
CastError: Cast to ObjectId failed for value "style.css" (type string) at path "_id" for model "Blog"
// Then simply remove from details.ejs
// I don't understand why, but with only this:
const id = req.params.id;
console.log(id);
// id looks fine, but when you add this below:
Blog.findById(id)
.then((result) => {
res.render("details", { title: "Blog Details", blog: result });
})
.catch((err) => {
console.log(err);
});
// another id shows up in console:
6308f2bbcb373829482ab874
style.css
// Is anyone able to explain this?
I have this same error as well
[SOLVED] add '/' before styles.css in head.ejs, so you have it as '/styles.css'
@@adetunjiojekunle1502 Thx m8
Took me an entire day to figure out why I was getting this error, thanks!
I used another way to delete a blog...
1- clicking on the delete link in the details screen.
2- it deletes the blog from database with "FindbyIdanddelete(id)".
3- redirect to the main page ('/blogs').
And it works, but I don't know if it is okay or not. May be there is a problem I didn't notice.
Please tell me Shaun if there is any problem in this way.
Hi Shaun, again a great tutorial. Did you know about the express middleware "method-override", is is quite neat because it allows you to simulate DELETE and PUT requests using the normal form, with just a hidden field. Tis would simply things a great deal as you wouldn't need to use the JavaScript.
Hey Can you help me how to use it?
@For Google Kuriwada thanks❤️i already Used it 9 months back still thanks
Greate videos (Thank you )
Sir, It can be also done by putting a (href) property in a(anchor tag)and set it value to '/blogs', without redirecting to the blogs page using JSON (lots of steps involves).
Underrated comment. Not sure why he did it that way but this is ALOT easier.
I am also a big fan of all of your courses.
But I am not experienced and a little bit confused.
After the Vue course I thought that the standard is to use frontend app in framework like VEU, and some backend app which REST API serving data in JSON format.
After this course I am not sure, because there is a different solution.
So which solution is better, and why.
1) Rest API with express.js and Mongo DB, and frontend application with VUE
2) Backend serving html pages with EJS view engine
This session was more difficult for me; I 'll try again later.
Thank you Boss
I have a question about those dynamic routes like /blogs/:id . What happens if you past incorrect id? Then your code will try to find incorrect id in the DB and throw an error? And then you'd handle that error by redirecting to 404? Do I understand correctly? Coz I used to struggle with React Router while trying to implement routing only on the front end...
best node.js tutorial ever
There was something which I was wondering when you create your request types : instead of using the name /blogs for a POST request, so the same as /blogs for a GET request, I assume that could you have picked any other term for this POST request instead and it would have worked without any problem?
express explained simply and clearly thank you NetNinjas
Glad it was helpful!
@@NetNinja yeah i wonder if you work video on payment integration with MERN for e-commerse site
If only you also had added the update part, that would have been so perfect.
I wonder why you left it out though.
so you can try to see if you can figure it out baed on the examples :). Not that hard with the GET & DELETE route examples. just use PUT the the applicable mongoose method. Best way to learn!
Great content as always!
Oooh my head hurts now! Content is excelletn as always but definitely need to play this one again!
Great, like always. Thank you! This whole course is such a nice refreshing
please make a series of node and react combined I can only understand your way of teaching on the whole internet. Love the way u teach it.
what vscode theme you are using?
and if u have time pls make a video about some useful vscode extensions. and ty so much for those courses
thankl you for make uni a little easier for me
best tutorial i've ever seen
is there an example of making an update route path. I don't know if I am on the right track with the one I made.
nevermind :D I just figured out how to do an update method for my crud application. also thank you for the course. You are literally one of my top sources to go to when I am interested in learning more for the frontend in my full stack journey.
Ever best explaining,
You are a great teacher, may Allah bless you. 😇
Hey Shaun, how does node distinguish between /blogs/:id and /blogs/create request? Since id is not defined as an number, wouldn't it try to find blog with an ID of "create" and fail?
You are correct - the create route should be below the :id route :)
@@NetNinja I think the create route should be above the :id route :)
// blog routes
app.get('/blogs/create', (req,res) => {
res.render('create', {title: 'Create a new blog'});
});
app.get('/blogs', (req,res) => {
Blog.find().sort({ createdAt: -1 })
.then((result) => {
res.render('index', {title: 'All Blogs', blogs: result})
})
.catch((err) => {
console.log(err);
});
});
app.post('/blogs', (req,res) => {
const blog = new Blog(req.body);
blog.save()
.then((result) => {
res.redirect('/blogs');
})
.catch((err) => {
console.log(err);
});
});
app.get('/blogs/:id', (req,res) => {
const id = req.params.id;
Blog.findById(id)
.then((result) => {
res.render('details', { blog: result, title: 'Blog Details' })
})
.catch((err) => {
console.log(err);
});
});
app.delete('/blogs/:id', (req,res) => {
const id = req.params.id;
Blog.findByIdAndDelete(id)
.then((result) => {
res.json({ redirect: '/blogs' })
})
.catch((err) => {
console.log(err);
});
});
@@longnt7375 thanks dude u helped me out of this error. I wasted 2hrs searching for what happened
I just ran into this error and moving app.get('/blogs/create' ...) above both app.get('/blogs/:id' ...) and app.delete('/blogs/:id' ...) seems to fix it.
@@srichandrasiripuram4724 same bro T-T
the app.post('/blogs'...) shouldn't it run upon the case '/blogs/create'... ie app.post('/blogs/create'...) ?
very exciting, you are the best instructor, thanks for considering this topic
Hello sir, can u make MERN stack courese?
Do you think you can create a tutorial about using node-fetch and creating a project where you would use a stock API for example?
Please do a full MERN Stack course.
I've been stuck for almost a day on post request, didn't know what I was doing wrong and nothing seems to help with my problem. Came here and in less than 10 minutes you already saved me with the "express.urlencoded" tip, ty!
It's weird : In your tutorial, you write .then((response) => { response.json() }) to get the redirection attribute, but it doesn't work - my side -, if I don't return response.json().
Edit : apparently, it's because we use return only with curly brackets, otherwise we don't have to.
Thanks for this really useful chapter.
Thanks man !!
wasted half an hour searching for the error 🥲🥲
For future people, why it doesn't work is: with curly brackets we need to write 'return response.json()' because otherwise the code doesn't return anything and the next then() doesn't receive any data. Without the curly brackets, JS assumes that respone.json() is the return value for the then method, and we get the 'data'
Why are we NOT updating a document ?
Rather than using then and catch we can simply make use of await. Not using await is unnecessarily increasing number of lines.
@23:31 can we not use href directly with the delete button providing the id in the url just like we did for the details page. that way we dont have to write evrything we wrote in the script tag??
How do we PUT, or otherwise edit and save an existing blog post?
I have:
* created an 'edit.ejs' based on 'create,' but with all textareas in the form.
* put it in a sub dir to distinguish it from others for sake of the router.
* added button to the details page that direct-links to edit.ejs:
* used all textareas in form to get full, editable text back into form
So the problem is that it currently creates a new, edited version of the original blog.
What's the best way of getting it to update rather than create a new blog? Thanks!
this is so awesome. I have learned a lot. I still have trouble with the mongodb not picking up the posts. I had to comment out all the code that related to it since it was crashing the app.
Any idea why do I get "undefined" when I try to console log the id? I have express, bodyParser, everything set properly.
Could we not make the button into a form tag and instead of a post request we add a delete request
?
Beautiful course!!! Amazing satisfaction!
Great tutorial, is there an example of put request with this type of logic?
Could you help me.
How can i add image to this blog?.
I tried Multer,but i couldn't display image
aunque no entiendo ingles pero se ve excelente lo que haces, a cada palabra que hablas tengo que traducir y no encuentro cursos en español eres genio
Me encantó tu dedicación al aprendizaje, realmente te apasiona aprender.
Love your videos. Still relevant and helpful
Awesome to hear :) love your username!
Master Ninja, how did you learn all these stuffs?
You are really really good.
Hi! I had to trim the id with the trim method to pass it to the Blog model, did i do something wrong or there was a change on how the string from mongoDB is returned?
the route /blogs/create needs to be above the routes that you pass parameters
Wow, been struggling with this for an hour. Thanks, that fixed it immediately!
I was wondering why the app that was working fine suddenly presented an error 2 days later and your post fixed the problem. Many thanks. 👋
But it adds event listener on the very first [a.delete]. How I can fix it?
Best node tutorial❤
Thanks!
This
Is pure gold !
When you did href="/styles.css" without the slash, everything works until you want the blog details...And then a GET /blogs/styles.css happens. When you miss the logged additional GET, you just wonder, how the following stack trace could happen 😅
Hello, Shaun. Where did you create the 'blogs' directory as in 'blogs/create'?
Nailed it. U r legitimate Ninja
The only part which I found a little difficult 😬 especially that delete.
Hi mate,
How could I use the contents of a div with the contenteditable="true" instead of a textarea? I would like to put a WYSIWYG app in there, but it always crash.
Cheers,
You keep mentioning that "this is asynchronous". How do you know when "something" is asynchronous or not? Is it documented somewhere? Also, you are using .then() syntax. How would you use async/await with this? Thanks
You can check the documentation to see if it's asynchronous or returns a promise. If you're using VS Code try and hover over it and see if it'll give you such information.
podrias hacer un curso completo de stack MEVN de Javascript y con estilos de Vuetify seria excelente
Hi,
I am trying to get attribute values, when i tested it with
console.log(req.body)
it return title value, snippet value, but it didn't back with body value
may I ask for help?
Can you show how to update the data?
Because I can’t get the data after I submit it. (PUT method)
Thank you in advance.
What I don't quite get is, when you deleted the post/thread, why did you send back to the client the place where they should be redirected and then, they get redirected clientside. Why not just redirect them serverside?
Would the reason of redirecting them on the client realm have to do with the fact, no serverside validation is required?
Thanks :)
is there an easier way to delete blogs now? that whole delete part was a mess
dude your back must hurt from carrying my whole grade
when you download course to github ?
İ have an issue and cant fix it
IS there not an express.js delete method like get and post?
Can I ask what theme of code is that you used? Your code color is much better than mine. I want to set it up like you !
e.g. it's only red highlight at the first "
did you figure out what theme?
Hi my script in the details.ejs is showing on browser and is not functional, I am unable to get my blogs to delete
Bro u are a genius ❤
Nice tutorial as always. Thank you
Hey, I was having sort of an error when I defined the app.get('/blogs/:id') before app.get('/blogs/create') as for no reason it was treating 'create' as an id
however it works when I define the blogs/create above.
Hi gang! I have an error: min 31:57
SyntaxError: Unexpected token '
Same error here... Also would love to finish the course :(
did u find solution ? i m stuck
@@parv69 I was having the same issue, and removing 'blogs' from endpoint solved it. It was trying to redirect to /blogs/blogs/asdfnasodifj so now I just have:
const endpoint = `${trashcan.dataset.doc}
and that fixed it for me, hope that helps!
your videos help me sm man
That's awesome to hear :) thank you
Quick question: This is server side rendering, right? If I wanted to use this same project and use react, the only best thing that's going to help me is react router, right?
yeah, this is serverside rendering. you should probably make raw json responses instead of rendering and then using axios or some kind of https request module to connect the front-end with it
Thanks man you are fantastic. I am learning a lot. Honestly, thank you!
Thanks a lot! i am bit overwhelm since #9. I was coming along fine, i dont know what happend :( Anyone feeling the same?
same, in the back of my head i'm just thinking, there has to be an easier way to do this with how far computing has come. taking notes and writing in the margins explaining what things do in your own words help
i get an error when i want to open create route after i have deleted all blogs ?
at C:\Users\Fatma\Desktop
odeJS
ode_modules\express\lib
outer\index.js:284:7 {
messageFormat: undefined,
stringValue: '"create"',
kind: 'ObjectId',
value: 'create',
path: '_id',
reason: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Hi :) What is your VSC color theme ? Good videos❤