K
K
kwecwcf2020-02-17 20:29:46
MySQL
kwecwcf, 2020-02-17 20:29:46

Why did the GET net::ERR_ABORTED 404 (Not Found) error occur?

Error test1.ru/:19 GET test1.ru:96/build.js net::ERR_ABORTED 404 (Not Found)
index.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Система</title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript"></script>
</head>

<body>
<div class="header">
<div class="header__section">
<div class="header__item headerButton1"><a href="#">Портфолио</a></div>
<div class="header__item headerButton2"><a href="#">Рейтинг</a></div>
</div>
</div>
<input type="button" name="b" value="Вход" />
<script src="build.js"></script>
</body>
</html>


test.js
var mysql = require('mysql');

console.log('Get connection ...');

var conn = mysql.createConnection({
database: 'university',
host: "localhost",
user: "aaa",
password: "aaa"
});


conn.connect();
var query = conn.query("SELECT `fio` FROM `students` WHERE `id`=1",function(error,result){
if (error) throw error;
console.log(result);
});

used browserfy
folder contains files:
node_modules
bundle.js
index.html
package.json
package-lock.json
style.css
test.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2020-02-17
@kwecwcf

You include some build.js instead of test.js/bundle.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question