Tuesday, 8 January 2019

triggering other post routes through express

I'm creating a react app with a node backend (just a pet project to improve my skills).When a form is submitted say it posts to '/books' (a simple example I could think of) and creates an entry in the db. I then want it to automatically post to '/pages' and create a certain number of pages (referenced to the book id).Is the best way to do this to put the logic within the '/books' post route in my backend to then make posts to the /pages route?Thanks

Submitted January 09, 2019 at 06:08AM by whichwaynext

No comments:

Post a Comment