DEV Community

Cover image for Hey! Did you know has an API??

Posted on


Hey! Did you know has an API??

Have you ever wanted to embed a "Recent Posts" in your website? has an API for this.

Check out this example:

Just make a simple HTTP request to this URL:
Enter fullscreen mode Exit fullscreen mode

Example JS usage:

  .then(res => res.json())
  .then(res => {
  res.forEach(article => {
    var item = document.createElement("div")
    item.innerHTML = `<b>${article.title}</b><p></p>${article.description}</p>`;
Enter fullscreen mode Exit fullscreen mode
  • screw IE. nobody uses it lol

Top comments (2)

Sloan, the sloth mascot
Comment deleted
__manucodes profile image

Yes, indeed!
I was working late at night, and I was a bit lazy....
I could have just used the .text-center class in TailwindCSS

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.