Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete front/build and Modify ResultPage Design #26

Open
wants to merge 14 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
10 changes: 10 additions & 0 deletions backend/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE DATABASE IF NOT EXISTS gift;

USE gift;

CREATE TABLE IF NOT EXISTS Feedback (
FeedTime DATETIME,
Selection VARCHAR(255),
result INT,
Feedback BOOLEAN
);
3 changes: 2 additions & 1 deletion backend/lib/algorithm.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ export function category2(answers) {
[2, 1, 0, 1],
],
[
// 6. 나는 [비건, 다이어트, 건강관리]
// 6. 나는 [비건, 다이어트, 건강관리, 해당없음]
[0, 5, 0, 5],
[0, 0, 5, 5],
[0, 0, 0, 9],
[5, 5, 5, 0],
],
];
const int_ans = answers.map((str) => {
Expand Down
30 changes: 30 additions & 0 deletions backend/mysql.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as mysql from "mysql";

var connection = mysql.createConnection({
host: "localhost",
port: "3306",
user: "root",
password: "1234",
database: "gift",
});

connection.connect();
var time = now();
var testQuery1 = "INSERT INTO `user` (`date`,`feedback`) VALUES (time,'굿굿');";

connection.query(testQuery1, function (err, results, fields) {
// testQuery 실행
if (err) {
console.log(err);
}
console.log(results);
});
var testQuery = "SELECT * FROM user";
connection.query(testQuery, function (error, results, fields) {
if (error) {
console.log(error);
}
console.log(results);
});

connection.end();
Loading