Pulling my hair out struggling to keep client and server side code separated.
Posted by Substantial-Art-8376@reddit | learnprogramming | View on Reddit | 3 comments
I’m relatively newer to coding and working on my first bigger project but have completely hit a wall with organizing my code. I’m trying to pull events from public API’s and also allow users to submit their events into a database. Currently using Node, react and mongo.
How do I most efficiently structure this project to separate front end and back end code?
aanzeijar@reddit
I don't understand the question. If it's client and server you already have a separation. If the code runs on the server - that's backend. If it runs on the client - that's frontend. If you have code that runs on both, put it into a shared component.
Substantial-Art-8376@reddit (OP)
it’s been staring me in the face the whole time
Gamer131249@reddit
Don't worry, we all have those moments