Merge branch 'main' of https://github.com/kobolol/AbschlussProjekt
This commit is contained in:
43
Speicher.txt
43
Speicher.txt
@@ -1,34 +1,27 @@
|
||||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
|
||||
192.168.200.93 Computer Schule
|
||||
|
||||
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
|
||||
|
||||
DB
|
||||
php.himb.net
|
||||
Server: himb.net:22049
|
||||
root
|
||||
Jonas2007
|
||||
|
||||
|
||||
UM Tabelle zu erstellen
|
||||
CREATE TABLE users (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
username VARCHAR(255) NOT NULL UNIQUE,
|
||||
email VARCHAR(255),
|
||||
password VARCHAR(255) NOT NULL,
|
||||
fullName VARCHAR(255),
|
||||
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
|
||||
/**@param {} x*/
|
||||
/**@typeof {} x*/
|
||||
|
||||
|
||||
https://codedamn.com/news/nodejs/use-json-web-token-jwt-in-nodejs
|
||||
|
||||
|
||||
<div class="screen">
|
||||
<nav>
|
||||
<h1>Spiel-Code:</h1>
|
||||
<h1 class="message">1A3B5C</h1>
|
||||
</nav>
|
||||
|
||||
<div id="playerList">
|
||||
<div id="player1" class="player">
|
||||
<h1>Spieler 1</h1>
|
||||
<h2>test</h2>
|
||||
</div>
|
||||
<div id="player2" class="player">
|
||||
<h1>Spieler 2</h1>
|
||||
<h2>test</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
/**@typeof {} x*/
|
||||
@@ -1,18 +1,21 @@
|
||||
const mySql = require("mysql2");
|
||||
const UserManager = require("./UserManager/UserManager");
|
||||
require("dotenv").config();
|
||||
|
||||
class DataBaseManager {
|
||||
constructor(host, database) {
|
||||
this.connection = mySql.createConnection({
|
||||
host: host,
|
||||
port: process.env.DB_PORT,
|
||||
user: "root",
|
||||
password:"",
|
||||
password: process.env.DB_PASSWORD,
|
||||
database: database
|
||||
});
|
||||
|
||||
this.connection.connect((err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ const DataBaseManager = require("./Database/DataBaseManager");
|
||||
const ExpressManager = require("./Express/ExpressManager");
|
||||
const SocketIOManager = require("./SocketIO/SocketIOManager");
|
||||
|
||||
const databaseManager = new DataBaseManager("localhost", "doublesnake");
|
||||
const databaseManager = new DataBaseManager("himb.net", "doublesnake");
|
||||
const expressManger = new ExpressManager(databaseManager);
|
||||
const socketIOManager = new SocketIOManager(databaseManager, expressManger);
|
||||
Reference in New Issue
Block a user