Wednesday, 15 March 2017

ExpressJS - How to create router controller in express

I followed this tutorial https://expressjs.com/en/guide/routing.html entitled express.Router;

Here is my app.js:

enter image description here

Here is my patientController.js

enter image description here

My problem is when run localhost:3000/patient/add it cannot find the route

enter image description here

I also used postman to send data using post method

enter image description here



via Gerald

No comments:

Post a Comment