All Questions
11,929
questions
-1
votes
0
answers
14
views
GET http://127.0.0.1:3001/search/3 404 (Not Found) error for retreiveing a record from a database
I am trying to create a web app to retrieve records from a mysql database but it seems i keep getting the 404 not found error. I am suing node.js for server side, and it seems that my endpoints are ...
-1
votes
0
answers
17
views
How to fix 'ER_FK_CANNOT_DROP_PARENT' error, 'ER_NO_SUCH_TABLE', 'ER_BAD_FIELD_ERROR' in Sequelize for MySQL? [duplicate]
When I run my server.js file I get the error mentioned in title.Also I get null violation errors when trying to insert into the TreeSeeds table. There is a foreign key called seedcompany_id in the ...
0
votes
1
answer
26
views
How to get Sequelize to recognize by primary key with MySQL database data set and fix bulkCreate() issue?
So I have a database where I am trying to establish a one-to-many relationship between Supplier and TreeSeed, whereby one Supplier can sell many TreeSeed. I have looked at the sequelize documentation ...
0
votes
1
answer
53
views
How to get Sequelize to recognize my custom foreign key and primary keys in a one-to-many relationship in MySQL during bulkcreate insert?
I am building a plant/arboretum style application in JavaScript. I am trying to create a one-to-many relationship between Supplier model and TreeSeed model. Meaning that one supplier can sell multiple ...
0
votes
0
answers
25
views
await is only valid in async functions and the top level bodies of modules nodejs [duplicate]
Basically using Nodejs I connect to mysql and create a pool using below code which works fine,
db.js
const mysql = require("mysql")
exports.database = mysql.createPool({
host: "...
0
votes
0
answers
20
views
Mysql rows transposing in Node.js with mysql2 [duplicate]
I am running an SQL script in Node.js using mysql2 npm-package. This script has multiple SQL statements that have to ultimately transpose a table's rows into columns. The SQL script runs correctly ...
-3
votes
0
answers
25
views
Here is a simple example of a dofollow link in HTML: [closed]
~!Assistir Filme Meu Malvado Favorito 4 2024 Online Dublado e Legendado Completo em Português HD
In this code:
href="https://consumer.huawei.com/en/community/details/topicId_210577/" ...
-1
votes
2
answers
72
views
React MySQL Insert query successful but not inserting into dB table
Working on a React/MySQL registration page. Insert query run, but is not inserting into the dB table. Not sure why.
In the backend folder, I have my server.js file:
const express = require("...
0
votes
0
answers
14
views
Backend container connection issue to production database container in docker
I'm trying to link 3 containers run by Docker to a production stage.
The first container is hosting a vuejs 3 application and runs smoothly.
The issue arrives when I use the command :
sudo docker ...
0
votes
1
answer
30
views
Sequelize code first with mysql cannot generate database
I am facing an issue related to sequelize when generating the database by commandline
npx sequelize-cli db:migrate
The firsting I installing my sql and using MySQL Workbench to connect it -> ...
0
votes
0
answers
38
views
How to upsert data in mysql in NodeJS
I'm using MySQL for the first time through a NodeJS application. I'm managing to insert into a table, but I'm attempting to adapt my code to upsert the data instead, if a value matches. I've been ...
0
votes
0
answers
22
views
How to Efficiently Handle Real-Time Forex Data Updates and Database Synchronization in Node.js?
I'm developing a Forex trading application using Node.js, where I need to handle real-time updates for around 600 currency pairs. The data comes from a FIX protocol engine and needs to be updated in ...
-2
votes
0
answers
15
views
Error in node.js with Mysql after a few hours [duplicate]
I'm new to node js, I built a server that uses mysql for the database, and after a few hours of running the server, an error appears and a crash occurs. I wanted to see if anyone could see something ...
0
votes
1
answer
66
views
TypeError: pool.promise is not a function
I am using mysql2 library for connecting to database.
const pool = mysql.createPool({
connectionLimit: process.env.DB_CONNECTION_LIMIT,
host: process.env.DB_HOST,
user: process.env.DB_USER,
...
0
votes
1
answer
18
views
How do I search an entry in database by the same search phrase for two separate models with reference in sequelize?
I'm trying to make a search in a database for invoices. In the server request handler I have only one thing: searchPhrase. So I have to search invoice by serial number of the invoice, and also by ...