I want to develop a node js application
In that i am getting this error regularly
Please help me
const express = require("express");
const mysql = require("mysql");
const app = express();
const db = mysql.createConnection({
host: "localhost",
user: "root",
password: "pass@",
database: "mydb",
});
app.get("/", (req, res) => {
return res.send("Connected");
});
app.get("/r", (req, res) => {
const q = `select * from fbads`;
db.query(q, (err, data) => {
if (err) {
return res.send(err.code);
} else {
return res.send(data);
}
});
});
app.listen(3000);
it shows results only 10 seconds after it shows error
Thank you…
I have tried it
npm config set registry http://registry.npmjs.org/
after that run
npm install -g @angular/cli
but not working
New contributor
Rafeeq is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.