diff --git a/database/config/build.sql b/database/config/build.sql index b2cfa4a..d047bbe 100644 --- a/database/config/build.sql +++ b/database/config/build.sql @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS students, teachers, grades, courses; CREATE TABLE IF NOT EXISTS courses( - course_id SERIAL PRIMARY KEY, + course_id SERIAL PRIMARY KEY, course_title TEXT NOT NULL ); @@ -20,11 +20,11 @@ INSERT INTO courses (course_id, course_title) VALUES(7,'English'); CREATE TABLE IF NOT EXISTS students( student_id SERIAL PRIMARY KEY, student_name TEXT NOT NULL , - student_birth INTEGER , + student_birth INTEGER NOT NULL, student_sex TEXT NOT NULL, - student_address TEXT , + student_address TEXT NOT NULL , student_EMAIL VARCHAR(320), - student_img VARCHAR(250) NoT NULL + student_img VARCHAR(250) NOT NULL ); diff --git a/database/queries/getData.js b/database/queries/getData.js index e69de29..8b30c48 100644 --- a/database/queries/getData.js +++ b/database/queries/getData.js @@ -0,0 +1,5 @@ +RTCPeerConnection.query(sql, (err, rows, fields) => { + if (err) console.log(err); + else console.log(rows); + response.send(rows); +}); diff --git a/public/grades.html b/public/grades.html index 68d9292..29a7f46 100644 --- a/public/grades.html +++ b/public/grades.html @@ -22,7 +22,7 @@

Student Managment System

- + @@ -38,7 +38,7 @@

Student Managment System

- 90 + Math 80 diff --git a/public/student.html b/public/student.html index 1dfaef8..bbbddd8 100644 --- a/public/student.html +++ b/public/student.html @@ -1,45 +1,41 @@ + + + + + Student Managment System + + - - - - - Document - - - - +
- school picture -

Student Managment System

+ school picture +

Student Managment System

- -
- -
-
- -
- -
- -
-

Ali

-

ID:134223

-
+
+
+
-
-

location:

-

birthday:

-

sex:

-

phone:

- - +
+
+ +
+ +
+

Ali

+

ID:134223

+
+
+
+

location:

+

birthday:

+

sex:

+

phone:

+
- - - \ No newline at end of file + + diff --git a/public/style.css b/public/style.css index 0a7c864..df175cd 100644 --- a/public/style.css +++ b/public/style.css @@ -1,70 +1,70 @@ .student_profolio { - display: flex; - flex-direction: column; - justify-content: flex-start; - padding-left: 100px; - box-shadow: 5px 5px 5px #aaaaaa; + display: flex; + flex-direction: column; + justify-content: flex-start; + padding-left: 100px; + box-shadow: 5px 5px 5px #aaaaaa; } .student_img { - border-radius: 50%; - width: 130px; - height: 130px; - padding: 10px; + border-radius: 50%; + width: 130px; + height: 130px; + padding: 10px; } .student_profolio_name { - padding: 10px 0 10px 0; + padding: 10px 0 10px 0; } .student_form { - display: flex; - flex-direction: row; - padding: 10px 35px 10px 20px; - justify-content: space-around; + display: flex; + flex-direction: row; + padding: 10px 35px 10px 20px; + justify-content: space-around; } .student_info { - padding: 40px; - box-shadow: 5px 5px 5px 5px #aaaaaa; - height: 320px; - /* background-color: oldlace */ + padding: 40px; + box-shadow: 5px 5px 5px 5px #aaaaaa; + height: 320px; + /* background-color: oldlace */ } * { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } .topsection { - background-color: #4e9cc9; - width: 100%; - height: 109px; - display: flex; - flex-direction: row; - align-items: center; + background-color: #4e9cc9; + width: 100%; + height: 109px; + display: flex; + flex-direction: row; + align-items: center; } .topsection img { - width: 50px; - height: 50px; - padding: 10px; + width: 50px; + height: 50px; + padding: 10px; } .topsection h1 { - margin-top: 22px; - font-family: "Anton"; - font-size: 6vw; - color: white; + margin-top: 22px; + font-family: "Anton"; + font-size: 6vw; + color: white; } .icons { - width: 100%; - height: auto; - padding: 5px; - display: flex; - flex-direction: column; - align-items: center; + width: 100%; + height: auto; + padding: 5px; + display: flex; + flex-direction: column; + align-items: center; } .icons img { @@ -84,10 +84,10 @@ } .searchForm input { - height: 25px; - border: 1px solid grey; + height: 28px; width: 46vw; background: #f1f1f1; + border: none; } .searchForm button { width: 76px; @@ -95,6 +95,7 @@ background-color: #4e9cc9; color: beige; font-size: 3vw; + border: none; } .gradesTable { @@ -117,4 +118,3 @@ color: white; font-size: 25px; } - diff --git a/src/app.js b/src/app.js index e69de29..47530a4 100644 --- a/src/app.js +++ b/src/app.js @@ -0,0 +1,15 @@ +const express = require("express"); +const path = require("path"); +const app = express(); +const request = require("request"); + +app.use(express.static(path.join(__dirname, "..", "public"))); +app.set("port", process.env.PORT || 5000); +app.get("/home", (request, response) => { + getdata(); +}); +app.listen(app.get("port"), () => { + console.log("The server is working ...."); +}); + +module.exports = app; diff --git a/src/controllers/user.js b/src/controllers/user.js index e69de29..60749cd 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -0,0 +1,2 @@ +const getData = require("../../database/queries/getData"); +const postData = require("../../database/queries/postData");