-
Notifications
You must be signed in to change notification settings - Fork 22
Our Code Structure
Evan Ugarte edited this page Mar 11, 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/
- React components call on functions defined in
src/APIFunctions
which then send requests to the API endpoints. - This abstracts
axios
POST and GET requests
- MongoDB models for our data is located in
api/models
- API endpoints can be found in
api/routes
- 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.