User feed feature and Cloudflare
bryanwong8 opened this issue · comments
Is your feature request related to a problem? Please describe.
We need to implement a feature to retrieve the latest posts from the tags that the users are following.
We also need to implement CloudFlare CDN with the staging and production sites for our API. This is to make all of the JSON responses faster.
Describe the solution you'd like:
Create a route to display the latest posts from the tags that the users are following.
Integrate Cloudflare with Heroku staging and production sites.
Models
None
Schemas
None
API Routes
User feed
Endpoints | HTTP Method | Description | Tested |
---|---|---|---|
{{APIURL}}/api/user/tags/articles | GET | User Feed |
Create/Edit Functions
User feed
- Create a route to return the latest 5 tags from the tags that the current user is following
- I would recommend making a class function to return the latest 5 articles from a tag.
- Then loop through the function and store the articles in an array then return it.
Additional context
- The route should return the latest 5 articles from the tag that the user follows.
- Should initially create a testing account with CloudFlare and create an instance. The free trial is good enough, we will make a Bit Project account on CloudFlare soon.
- I recommend looking at this video to see how CloudFlare integrates with apis, https://www.oreilly.com/library/view/rest-apis-with/9781788621526/video10_2.html and https://support.cloudflare.com/hc/en-us/articles/205893698-Configure-Cloudflare-and-Heroku-over-HTTPS