node.js

  1. H

    would Firebase be good for making a forum/chatroom?

    i struggle with php, so i was thinking should i use firebase instead of mysql, or should i keep using mysql and use node.js instead of php
  2. N

    Node.JS Loop and handling errors Puppeteer

    Hi there! I am looking for a solution to automate my script to re-run in an infinite loop till the script is stopped, and also i am having difficulties to let the script continue after any error, it should just re-start the process. At current, if all goes well it will run for some time till i...
  3. S

    Chess coding

    I have created a game of double chess that has been developed into an online game play.synergy chess.net I have noticed that chess.com is written in Java, JavaScript and PHP. Synergy Chess is written in ReactJS, NodeJS, Xitrium, Scala and Java. This makes it very hard to find qualified...
  4. T

    Node.JS sqlite3 with node.js not working

    I'm attempting to use sqlite3 with node.js, I'm on macOS. and I've tried everything imaginable to try and fix the problem but as soon as i try to run, const sqlite3 = require('sqlite3').verbose; const db = new sqlite3.Database('my_database.db'); it comes up with the error: Uncaught TypeError...
  5. parvinder21

    Node.JS Error: Cannot find module 'puppeteer'

    const automation = require("puppeteer"); const fs = require("fs"); const automationConfiguration = { headless: false } async function runautomation() { const browser = await automation.launch(automationConfiguration) const page = await browser.newPage() const navigationPromise =...
  6. odnil

    Node.JS How can I restructure my loop to paginate faster right now it takes too long?

    This takes ages to retrieve data. Is there a more efficient way to do this? Per_page limit is 100 & I needed the function to be able to find results for any date range using pagination. So I added a do while loop and this is what I ended up with: async function foo(repoOwner, repository...
  7. GREFF1978

    JavaScript CORS/Express: Getting data from server from domain html

    Howdy! This has been many days of trying to research however, either I am misunderstanding something or the solution online is not directred toward my issue. I am running a node server on a sub-domain as such: xxx.yyy.com I have express, socket.io and cors all installed. My app.js file...
  8. D

    Node.JS How to correctly prescribe if there is a filter for the filter?

    There is a filter. The filter filters by the "full name" field. Everything works. Logic: - the user enters the criteria for the filter in <input id="fio"> - criteria fall into JS - data is received from the database - the HTML table is stored. How to set up a filter for...
  9. D

    Node.JS How to connect `Bootstrap` using `nmp`?

    How to connect `Bootstrap` using `nmp`? In a cdn project, Bootstrap is connected. Prosjects: - cdn - https://disk.yandex.by/d/fyuicfi8nli_pg - npm - https://disk.yandex.by/d/CGBJmRhX4vqm6A app.js const express = require("express") const path = require("path") const app = express()...
  10. D

    Node.JS I can't go to another ejs page.

    I can't go to another ejs page. Index.ejs <h1>Index page</h1> <a href="/about" >About-1. Описание</a> </br> <a href="http://localhost:3000/About/" >About-2. Описание</a> In routes.js added. .get('/about', (req, res) => { res.render('about'); }) routes.js Full code const...
  11. D

    Node.JS Main menu in the form of a tree

    Advise ready-made solutions: on the left the main menu in the form of a tree, on the right the article. Logic: - the user clicks on the menu; - an article corresponding to the menu node appears on the right. Preferably without updating the entire page, i.e. after clicking on the menu, only a...
  12. D

    Node.JS Error You have tried to call .the(), .catch() [closed]

    You have tried to call .the(), .catch() **Question.** 1. What is the reason for the problem? 2. How to fix the problem? I have a project, I want to launch it. The project is located in the folder `e:\Test\Pro01\`. **I've done it:** - I opened the Windows console; - I entered the...
  13. A

    Node.JS Validation doesn't work in custom promisify function

    Implement the promisify(callbackFunction) function so that it takes a callback-based function and returns a promise-based function. The promise-based function can be called with one or more arguments. If so, pass them to callbackFunction, and add an argument at the end for the callback. In...
  14. Elitequestion

    Node.JS Node Js

    https://ibb.co/MBhC7yt -> book-router.js Task 2. Create books to the server API In the base solution, existing books can only be fetched using the API. The remaining three tasks are concerned with extending the API to add, modify and delete books. In this task, you will add a new endpoint to...
  15. gregosilaja

    Node.JS how to fix connect ENETUNREACH on npm on linux

    i am not using a proxy im just a noob trying to learn how to develop with `create-react-app` locally on my machine(linux) this is the output of `tracepath registry.npmjs.org` ``` 1?: [LOCALHOST] 0.020ms pmtu 1500 1: 2001:4451:664:1400:caf6:c8ff:fef2:bdcb...
  16. edwardsmarkf

    JavaScript promises changing question

    hello all, first time on this forum. i have serious problems trying to wrap my head around promises, so i have decided to just keep a couple of working examples around so i can refer back to those. here is an example i was able to put together: const firstPromise = (promiseInput) => {...
  17. F

    JavaScript Extract variable value from mysql query result

    This may seem like a pretty basic one but I am executing the query: var sql = 'SELECT command FROM motoron2 ORDER BY id DESC LIMIT 1'; and seeing the following from console.log(result) --> [ RowDataPacket { command: 1 } ] How can I make a variable named command equal to 1 from this? Below is...
  18. N

    Node.JS Https requests via 2 socks5 proxies

    I am trying to achieve an experimental setup in nodejs as illustrated below: https-server --> local socks5 proxy (Tor) --> my external socks5 proxy --> webserver. The existing https-server was written in nodejs and it intercepts requests from the clients firefox browser, modifies the headers...
  19. E

    Node.JS How do I collect HTML form data when hosting using Node.js as backend?

    I am trying to setup a small application to collect form data from users and store it on MongoDB database. I was able to do this on my local server by setting the HTML action attribute to point to my localhost route used for setting up the Express post method which is...
  20. Supa

    Node.JS MongoDB/Mongoose save a string to a specific collection

    there is a thing that im confused about, i'm using node.js and express.js (template express) and i have a mongodb database. i have some code like this ```js //variables for router, mongoose e.t.c are included, but that would be long router.get("/", landing.get_lead); //connects to mongoose and...
Top