Friday 23 December 2016

Working on a separate API (Express.js) and frontend (React.js) project, have some questions.

Hi good people of reddit, So I'm currently working on a backend API in express for an application that'll later on need to have frontend built as well. Frontend is going to be built in React.My main question is - would it be enough for the frontend project to be ran on the server with something like webpack (in other words, something like create-react-app) or would it need to have a separate clean express project that it should then be embedded into?I remember reading somewhere about the usefulness of the latter, but I can't help but think of that as of complicating things too much? I mean, we're trying to split them, the backend and frontend, not glue them back together, IMO that seems to be redundant.But then again, I'm totally in the dark, first time trying to do this backend/frontend separation and would like to hear some feedback if some of you did this already. In my mind, React.js should simply interact with API using AJAX in the background and provide smooth UI/UX.My idea is to have (at start) one server (DO, AWS) that'll host a 1) express server, 2) react and would have nginx to do reverse-proxy for now.Best regards!

Submitted December 23, 2016 at 08:21PM by eXtremeRR

No comments:

Post a Comment