GithubHelp home page GithubHelp logo

cubny / php-built-in-server-manager Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 4.0 10 KB

Bash script to stop, start, restart PHP built-in web server

License: The Unlicense

Shell 100.00%
php development-utility

php-built-in-server-manager's Introduction

php-built-in-server-manager

Manage PHP built-in web server like a pro

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

Available commands:

  start     Starts PHP built-in web server server on specified hostname:port, default is localhost:8080
            router is a PHP script to which all requests will be redirected (if used)
  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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.