This is a small, simplistic example of creating a URL shortener in PHP.
This is a small, simplistic example of creating a URL shortener in PHP.
To use this application, you will need the following:
First, clone the project to a directory on your local machine by running the following command:
git clone [email protected]:settermjd/php-url-shortener.git php-url-shortener
Then, start the application. The two quickest ways to do so are:
Instructions for both are listed below.
To start the application, run the following command in the top-level directory of the project.
docker compose up -d --build
Note: The first time that you run the command, if you don't have one or more images in your local Docker cache, then they have to be downloaded. This shouldn't take too long, allowing for the speed of your internet connection.
New to Docker Compose and want a hand getting started? Then grab a copy of my free book: Deploy with Docker Compose.
To start the application, run the following command in the top-level directory of the project.
php -S 0.0.0.0:8080 -t public
If you have any questions or queries, either create an issue or a PR, or email me: matthew[at]matthewsetter.com.