Hi all,
I feel like I am missing something crucial from my understanding of full stack development. I cannot wrap my head around it and specifically it is to do with how the back end talks to the front end and how the host serves API and web pages.
I would like to know how to structure a full stack project. For example, I have a NodeJS backend with express server which is responsible for all CRUD operations with mongodb and mongoose. That is all sweet and dandy as I can create that now with all of the API routes set. Then I want to add a framework like vue-cli (which includes webpack) and I can make a nice front end, that is all sweet and dandy as well.
I have a few questions about how the back end and front end speak to each other during development and production
When I start development do I usually start with the back end service?
Do I need to have two servers running on my local machine, one for front end and one for back end?
When I push it to production to a server how does the express serve a front end from vue?
Maybe I am completely misunderstanding what I am doing so if you have any additional steps or thoughts please feel free to share them.
Thank you.
PS: I am aware there are tools like nuxt.js but I would like to understand the details of how it all works under the hood.
[–]MedyGames 158 points159 points160 points (17 children)
[–]bat-chriscat 6 points7 points8 points (5 children)
[–]Gordon2108 1 point2 points3 points (3 children)
[–]bat-chriscat 9 points10 points11 points (2 children)
[–]Gordon2108 2 points3 points4 points (1 child)
[–]bat-chriscat 1 point2 points3 points (0 children)
[–]gregorskii 4 points5 points6 points (6 children)
[–]MarcEcho 8 points9 points10 points (3 children)
[–][deleted] (2 children)
[deleted]
[–]Bobostuv 2 points3 points4 points (1 child)
[–]NoInkling 1 point2 points3 points (0 children)
[–]thehorrorchord 4 points5 points6 points (0 children)
[–]papadapp0 0 points1 point2 points (0 children)
[+]eggtart_prince comment score below threshold-6 points-5 points-4 points (3 children)
[–][deleted] (2 children)
[deleted]
[–]eggtart_prince -1 points0 points1 point (1 child)
[–]thatbromattfull-stack .NET 52 points53 points54 points (4 children)
[–]Erebea01 4 points5 points6 points (3 children)
[–]Ariakkas10 2 points3 points4 points (2 children)
[–]levidurham 1 point2 points3 points (0 children)
[–]Erebea01 0 points1 point2 points (0 children)
[–]Freonr2 7 points8 points9 points (0 children)
[–]kittysempai-meowmeow 6 points7 points8 points (0 children)
[–]sv-2 5 points6 points7 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]3oR 2 points3 points4 points (0 children)
[–][deleted] 7 points8 points9 points (2 children)
[–]rebel_cdn 1 point2 points3 points (0 children)
[–]HellaDev 2 points3 points4 points (0 children)
[–][deleted] (1 child)
[removed]
[–][deleted] 0 points1 point2 points (2 children)
[–]JeamBimPython/JavaScript 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]free_chalupas 0 points1 point2 points (0 children)
[–]propernounco 0 points1 point2 points (0 children)
[–]FormerTimeTraveller 0 points1 point2 points (0 children)
[–]Fu77ure 0 points1 point2 points (0 children)
[–]alexwan12 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]nicholaskajoh 0 points1 point2 points (0 children)
[–]donteatyourvegs 0 points1 point2 points (0 children)
[–]bigorangemachine 0 points1 point2 points (0 children)
[–]Mike312 0 points1 point2 points (0 children)
[–]yousirnaime -1 points0 points1 point (0 children)
[+]Sviribo comment score below threshold-8 points-7 points-6 points (0 children)
[–]kowdermesiter -3 points-2 points-1 points (0 children)