I uploaded my node js server to the google cloud app engine service to be able to make the front end work. I also uploaded the frontend and my website is now live. The node js is running fine and it’s deployed in the app engine in google cloud. my only problem is that whenever I try to make a
Tag: node.js
What is the typeof of a QuerySnapshot?
With firebase, you can get documents in a collection like this: const collectionData = await collectionPath.get(); using collectionData, you can loop with: The above code makes collectionData behave like an array of documents. However, you can still treat it like an object by calling things like size? e.g collectionData.size will return the size of items in there. My question is,
My bot can’t take errors when failling to run a “join” voice channel command
I’m currently coding a discord.js bot and I made this join command so the bot can join my voice channel The problem is that I have no idea how to make it so that if the last function gets an error or doesn’t work at all It can send an error message to the user like @User, I could not
How to delete a cookie in Reactjs
I am developing a web app with react front-end and node baack-end I want to delete the cookie being stored so that I can successfully be able to logout the user. I have tried using the js-cookie library and react-cookie library but it does not work. nav_component: How I set the cookie in the backend: It should be noted that
Discord bot not responding/reacting to anything (JS)
So I am new to the world of discord bots and wanted to try myself on this new challenge. I got the foundation running after watching a few tutorials and reading a few posts but now my problem is that the bot doesn’t react to anything after starting up… All it does is displaying: ‘Ready!’ in the console. After that,
Three different `this` behaviours for three different JS engines
I was learning about the this keyword and how it means different things with regards to regular functions vs ES6 arrow functions and function expressions and I came across something odd when trying to run the following code in Chrome, Deno and Node. So I prepared following: Example: Deno output: Node output: Chrome output: According to my understanding of this,
Creating Compressed JWT Payload in JavaScript
I have a function which parses a compressed JWT Payload into JSON. It makes sense to me the way the function works. I want to create a function that can do the exact opposite: Take a JSON object and turn it into a COMPRESSED JWT Payload. The function that parses and decompresses: …outputs the JSON. …inputs the JSON. My attempt
Why do we install dependencies during Docker’s final “CMD” command, in development?
I’m working through a book about bootstrapping microservices, and the author provides the following dockerfile, which is meant to be used in development.** The CMD command here is obviously somewhat unusual. The rationale provided is as follows: By doing the npm install when the container starts, we can “make use of npm caching so it’s much faster to install at
How to deal with NestJS @Get() decorator?
This block of code works properly. I’m able to access both functions with the URL http://localhost:3000/vehicle/availableVehicles & http://localhost:3000/vehicle/1 accordingly But when I just swap between the 2 functions like code block below then the function availableVehicles() doesn’t work & the URL http://localhost:3000/vehicle/availableVehicles hits the getbyId() function. What to do? Or what I’m doing wrong? Thanks in advance. Answer You just
Using async await in Cypress
I’m very new in Cypress and I’m trying to take a value from an element to use after in the test, but I can’t manage to get the value. Someone said that I need to use async await, but it is not working or maybe I’m doing something wrong. Thanks in advance! Answer You can use aliases and save the