Freelancing Project for my STEM SChool
This system was programmed by me and another friends help me in building and programming it.
This repo consists of:
- snap.sql (database code)
- backend files (written in go-lang)
- frontend files (paid template was used and some js coding for fetch apis coming from backend)
install the project:
git clone https://github.com/MohamedYasser343/School-System.git
- insert data in snap.sql using:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
- config your database in Database/Connection.go:
var DBAddress string = "<user>:<password>@tcp(<ip>:3306)/<database_name>"
var DB *gorm.DB
func Connect() {
connection, err := gorm.Open(mysql.Open("<user>:<password>@tcp(<ip>:3306)/<database_name>"), &gorm.Config{})
if err != nil {
panic("Couldn't Connect To The Database.")
}
DB = connection
connection.AutoMigrate(&Models.User{})
}