Skip to content

Commit

Permalink
Added examples for testing purpouses
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostixGameDev committed Sep 5, 2024
1 parent 09f64e3 commit 35c5ce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const db = mysql.createConnection({
host: "localhost",
user: "root",
password: "",
database: "votos"
database: "lolacine"
});

db.connect(function(error) {
Expand All @@ -23,7 +23,7 @@ const db = mysql.createConnection({
`CREATE TABLE IF NOT EXISTS \`admins\`
(ID tinyint AUTO_INCREMENT PRIMARY KEY,
username tinytext NOT NULL,
password tinytext NOT NULL)`];
password tinytext NOT NULL)`, "INSERT INTO votos (name, logo) VALUES ('Example 1', '')", "INSERT INTO votos (name, logo) VALUES ('Example 2', '')", "INSERT INTO votos (name, logo) VALUES ('Example 3', '')", "INSERT INTO votos (name, logo) VALUES ('Example 4', '')"];
//Query to the database
setupQueries.forEach(function(query){
db.query(query, function (err) {
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ app.post('/proposals', (request, response) => {





//Server Listen
//============================================================================
app.listen(port, () => {
Expand Down

0 comments on commit 35c5ce0

Please sign in to comment.