All Projects → cubny → php-built-in-server-manager

cubny / php-built-in-server-manager

Licence: Unlicense license
Bash script to stop, start, restart PHP built-in web server

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to php-built-in-server-manager

MagicMirror-Module-Template
Template module for MagicMirror
Stars: ✭ 54 (+157.14%)
Mutual labels:  development-utility
WP-Query-Console
⚡ Handy WordPress plugin to test various WordPress queries -
Stars: ✭ 25 (+19.05%)
Mutual labels:  development-utility

php-built-in-server-manager

Manage PHP built-in web server like a pro

usage: ./server <command> [<hostname>:<port>]

Available commands:

  start     Starts PHP built-in web server server on specified hostname:port, default is localhost:8080
  stop      Stops the PHP built-in web server
  restart   Stops and Starts on previously specified hostname:port
  status    Status of the process
  log       Show the PHP built-in web server logs. Use the -f option for a live update

How to Use it

This is a very basic script so you're not limitted to any specific method. I suggest one of these two:

  1. Copy server script to root of your PHP project.
  2. Copy/Symlink to your one of $PATH directories like ~/bin or /usr/local/bin and use it everywhere.

Note: When starts, two files server.pid and server.log will be created in current working directory and when stopped, only server.pid will be deleted but server.log remains.

the server script can be renamed to whatever you like. I personally prefer pmserver. .pid and .log files will have the same name as the filename e.g. when server renames to pmserver there will be pmserver.pid and pmserver.log files

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].