Add CORS middleware and user database schema

- Implemented CORS middleware in the project to handle cross-origin requests.
- Added necessary files for the CORS package including README, LICENSE, and history documentation.
- Created a SQL schema for the users table with appropriate fields and constraints.
- Inserted mock data into the users table for testing purposes.
This commit is contained in:
2025-07-21 17:38:25 +02:00
parent 46fa608a47
commit e4bceb8258
24 changed files with 1644 additions and 29 deletions

17
scheme.sql Normal file
View File

@@ -0,0 +1,17 @@
-- Table structure for the database
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL UNIQUE,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created TIMESTAMP NOT NULL DEFAULT NOW()
);
-- Mock data for users
INSERT INTO users (username, first_name, last_name, email, password)
VALUES
('test1', 'John', 'Doe', 'jdoe@example.com', '1test'),
('t', 'John', 'Doe', 'd@example.com', 'g'),
('test2', 'Alice', 'Smith', 'asmith@example.com', '2test');