These APIs will be how the backend communicates with the react frontend. We will use the express framework to define endpoints. We should have skeleton APIs which return empty values just to get some of the structure in place. A few APIs to think about are:
Get a Single Post
Should have an endpoint like GET /posts/<post-id> and retrieve one post object
List Posts
Should have an endpoint GET /posts and will return a list of post objects.
Make a post
Should have an endpoint POST /posts and will send a post object to the backend
Note: these APIs will likely have extra functionality than specified here, however just getting them working is what's important for now.
We may also want to create a new name for a "post" to avoid confusion.
These APIs will be how the backend communicates with the react frontend. We will use the express framework to define endpoints. We should have skeleton APIs which return empty values just to get some of the structure in place. A few APIs to think about are:
Get a Single Post
Should have an endpoint like
GET /posts/<post-id>
and retrieve one post objectList Posts
Should have an endpoint
GET /posts
and will return a list of post objects.Make a post
Should have an endpoint
POST /posts
and will send a post object to the backendNote: these APIs will likely have extra functionality than specified here, however just getting them working is what's important for now.
We may also want to create a new name for a "post" to avoid confusion.
3 Hours