Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.16 KB

File metadata and controls

35 lines (23 loc) · 1.16 KB

Example : Simple PHP Web Server

The purpose of this example is to show you how you can build an Athena plugin to manage a simple PHP Web Server.

How to install

Simple as executing the following command :

  $ ./athena plugins install webserver https://github.com/athena-oss/example-plugin-simple-php-webserver.git

How to use

This plugin provides the following commands :

  • start - starts the webserver using the source_directory (htdocs folder - the entry point of the website) and the port that you specify.
  $ ./athena webserver <source_directory> <port>
  • stop - stops the webserver that is running on the port that you specify.
  $ ./athena webserver <port>

After running the start command you might want to check the current status of the server, in order to do that, run the following command :

  $ ./athena info

Where should I look into to understand how this works?

You should have a look into the scripts start_pre.sh and stop_pre.sh, which actually do the magic, to understand what is happening there.