Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Configuring application

Electron_prod edited this page Jan 28, 2024 · 3 revisions

👋 Introduction

You can configure TimeTableSite in "settings.json" file. Here is the default configuration file:

{
    "site": {
        "port": "80",
        "enabled": "true"
    },
    "remote_uploader": {
        "password": "TimeTableSite",
        "port": "90",
        "login": "electron",
        "enabled": "true"
    },
    "api": {
        "port": "81",
        "enabled": "true"
    }
}

🌐 "Site" feature

If you want to disable the website built into the application, change the "enabled" parameter to "false". If you want to change website's port, change "port" value to port you want.

How to use it?

Open this link in web browser: <server's ip>
If your port not equal 80, open this link: <server's ip>:port

How it looks?

image

Customization

If you want, you can change or create .HTML files as you want. Server also supports .CSS files, but it is recommended to insert into .HTML your CSS code.

⚙️ "API" feature

If you want to disable the API server built into the application, change the "enabled" parameter to "false". If you want to change api server's port, change "port" value to port you want.

How to use it?

Open this link in web browser: <server's ip>:port

Available requests

"get" - get all data from database
"getclasses" - get all classes from database
"getday/<DayID>/<classname>" - get all data for day and class
"getteacherlessons/<teacher>/<DayID>/<classname>" - get teacher's lessons for day and class
"getdaylessonsteacher"/<DayID>/<teacher> - get teacher's lessons for day

NOTE: These commands return the result with HTML code for beauty.
If you only want the result, add "raw" to the command at the end.
Examples:

get - getraw
getday - getdayraw

📥 "Remote uploader" feature

This function is responsible for the ability to upload a timetable to the site using the "Send" function in TimeTableConfigurator.
If you want to disable this feature, change the "enabled" parameter to "false".
if you want to use this function, then do not forget to change your login and password.

How to use it?

Watch this.

Clone this wiki locally