-
Notifications
You must be signed in to change notification settings - Fork 37
Our Code Structure
Evan Ugarte edited this page Jan 23, 2020
·
17 revisions
- Anything that has it's own webpage can be found in
src/Pages/ - Anything that is used across webpages can be found in
src/Components/
- MongoDB models for our data is located in
api/models - API endpoints can be found in
api/routes
- React components call on functions defined in
src/APIFunctionswhich then send requests to the API endpoints. - This abstracts
axiosPOST and GET requests
- Write an API Endpoint.
- Create a function that can call on this endpoint located in
src/APIFunctions. - You can now import this function in your React component and call on it.