Install the latest SWI-Prolog development version.
git clone https://github.com/tranlynhathao/prolog_test_web.git
cd prolog_test_web
swipl run.plNote
To view the interface, open the address 127.0.0.1:3000 in your browser.
The passwd file should contain entries in the following format:
username:hashed_password
-
usernameis the name of the user (e.g.,admin). -
hashed_passwordis the password hashed using a secure hash function, typically MD5 or SHA-256.Example:
admin:$1$randomsalt$abcdef1234567890abcdef1234567890You can use tools like
opensslto generate hashed passwords:openssl passwd -apr1
Enter the desired password, and it will generate a hash.
-
Use
htpasswd(if available):htpasswd -c passwd admin
The above command will create a new
passwdfile with the usernameadminand prompt you to enter a password. -
If
htpasswdis not available, you can manually hash the password. For example, to create a hash for the password1234:?- use_module(library(crypto)). ?- crypto_password_hash('1234', Hash), writeln(Hash).Then add it to the
passwdfile:admin:$pbkdf2-sha256$... (the generated hash)
- Ensure the
passwdfile is in the correct location (e.g., the same directory asserver.plor provide the absolute path).
- Prepare documentation for Prolog logic
- Add pages to the website
- Adjust the navbar for the documentation
