exmp
v1.0.5
Published
EXMP is a webserver that can host static pages like html. for example if you request to HOSTNAME/ then its will send data of /exmp/html/index.html
Downloads
326
Readme
EXMP
EXMP is a lightweight static page webserver based on express
How EXMP works?
Exmp will get the file data that user requested to, don't worry it's can't access the root and user cant access data form files name in .exmpignore
Index page
/
| Client | Server | Response |
| :-------- | :------- | :------------------------- |
| /
| /index.html
| 200. OK |
Static Pages
/test
| Client | Server | Response |
| :-------- | :------- | :------------------------- |
| /test
| /test.html
| 200. OK |
JSON Files
/test.json
| Client | Server | Response |
| :-------- | :------- | :------------------------- |
| /test.json
| /test.json
| 200. OK (application/json) |
CAUTION
THIS WEBSERVER IS USE PHP-CGI, MAKE SURE YOU INSTALL PHP FPM AND PHP FIRST.
Installation Commands: | OS | Command | Notes | |---|---|---| | Debian/Ubuntu | sudo apt install php php-fpm | May need php-mysql, php-xml, etc., based on your needs. | | CentOS/RHEL | sudo dnf install php php-fpm | Might require enabling the remi repository for newer PHP versions. | | Fedora | sudo dnf install php php-fpm | Similar to CentOS/RHEL. | | macOS (Homebrew) | brew install php | macOS has pre-installed PHP, but it's usually outdated. Homebrew is preferred. | | OpenSUSE | sudo zypper install php php-fpm | | | Arch Linux | sudo pacman -S php php-fpm | | | Alpine Linux | apk add php php-fpm | | Explanation:
- php: This package installs the core PHP interpreter.
- php-fpm: This package installs the FastCGI Process Manager for PHP, allowing PHP to communicate with web servers efficiently.
Warning
$_SERVER $_COOKIE $_SESSION or server things is not supported, php-cgi is runned on CLI