Skip to content

Tag: node.js

how to sent request to discord bot API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago. Improve this question How do I properly send a discord API request, and where do I get a valid …

Unable to load CSS file within nodeJS app

I have an app that I followed from a tutorial for the backend in nodeJS and Express. My connection to MongoDB via Mongoose is working. However, I’ve been trying to add a front-end- at the moment- just a simple html/ejs/css form. My endpoints are loading in localhost but only the html/ejs is rendering. M…

How to get a certain element from a body?

I use node-fetch , and I get the body of the site this way: The console displays the full body of the entire page. But I want to get a specific element with a certain class. How do I change the code to do this? Answer You can use cheerio.js. It is an implementation of jQuery for node. The below

String tokenizer method

Consider strings with this format: where id, string1, string2 and string3 can be string of variable length, and extension is an image extension type. For example, two possible strings could be: I need tokenizer method in JavaScript for an express/nodejs API that takes these strings in input and outputs an obj…

How to Make a ShopifyQL query?

Shopify recently announced ShopifyQL for easier accessing of analytics data. However, I’m unclear of how to actually make a ShopifyQL call. They do include an example. However, using the GraphiQL tool to run the query hits a number of errors: I also tried making an authenticated call with the example qu…