Hey all, I'm new to this side of things and have a question. I'm designing a node server (using express) to run on both web and mobile that interacts with a mongoose database. I want to be able to manipulate json data and then parse it into my database objects while also being able to create/delete/edit the objects from any platform. The trouble I'm having is deciding the best practice for accomplishing this. My hunch is to write the API as middleware and then have two separate routers to deal with web vs mobile requests (mainly because web calls will result in redirects etc whereas on mobile that can all be handled with native code). Can someone push me onto the correct path?Extra, probably relevant, detail: At the moment I've elected to use pug as my templating engine since it's fast and easy and I'm really only in the prototyping stage of what I'm doing.
Submitted December 05, 2017 at 08:43PM by kuzaikami
No comments:
Post a Comment