Hook backend APIs for stars/comments/reads
See original GitHub issueHi all,
I’m new to nuxt content and I am trying to build a personal blog with stars / comments / reads. Since nuxt content is generating static files, how can make it work with an express backend for storing stars / comments / reads?
I’m planning to use express talk to a mongo db for storing the stars / comments / reads.
One way I can think about is to use slug
as the identifier of an article, and fetch db using this as article id. However if I end up changing the name of the slug, all the backend data will be messed up.
Is there a way the nuxt content apis can call my backend apis to decorate the response?
Any suggestions will be very helpful!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Popular backend APIs - Back4App Blog
This article lists some popular backend APIs including Firebase, Backendless, Kii, Django, etc.
Read more >How To Call Web APIs with the useEffect Hook in React
In this tutorial, you'll use the useEffect and useState React Hooks to fetch and display information in a sample application, ...
Read more >Utility APIs · Backstage Software Catalog and Developer ...
To access one of the Utility APIs inside a React component, use the useApi hook exported by @backstage/core-plugin-api , or the withApis HOC...
Read more >Connecting the frontend and the backend - YouTube
Want to learn more about how to build production grade APIs and support the channel? Buy my book on leanpub: ...
Read more >NoCodeAPI – The easiest way to connect APIs without code
NoCode API is a great place to experiment with APIs and interact with them, ... Twitter, Telegram, Open Graph API, MailChimp, 50 +...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess I am late at this but seeing the issue open I just though of sharing my point of view as well… Just like Atinux said, you can include a unique ID in the front matter and use it. THATS THE WAY FOR YOU TO GO
I have done something similar with my personal bog as well. but instead of setting id in front matter I have used the slug as the unique id itself (because I am naming every file uniquely)
https://github.com/TheLearneer/santoshb.com.np/blob/master/pages/blog/_slug.vue#L75 https://github.com/TheLearneer/santoshb.com.np/blob/master/pages/blog/_slug.vue#L121-L127
Also I am using disqus commenting system but still everything you are telling accounts.
I tried this approach but the randomId will be changing everytime I update the content of the
.md
file.