while running $.post function it says todos.js is not found
Problem in ajax post request
@nkumar199775 please upload your code on github and send me the link of the repo along with the screenshot of the error. Thankyou
second link is with screeshot of error
@nkumar199775 there is no /todos/ what you have defined in your server.js is /routes not /todos change that, and run again.
we are suppose to give path of where ajax call is sent,right? and tell me one more thing what does module.exports do here?
@nkumar199775 yes, you have to provide the path to the ajax request
The module.exports or exports is a special object which is included in every JS file in the Node.js application by default. module is a variable that represents current module and exports is an object that will be exposed as a module. So, whatever you assign to module.exports or exports , will be exposed as a module.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.