php-url-shortener

This is a small, simplistic example of creating a URL shortener in PHP.

Stars
4

PHP URL Shortener

This is a small, simplistic example of creating a URL shortener in PHP.

Requirements

To use this application, you will need the following:

Usage

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:

  1. Use Docker Compose
  2. Use PHP's built-in web server

Instructions for both are listed below.

Using Docker Compose

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.

Using PHP's built-in webserver

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

Have Questions?

If you have any questions or queries, either create an issue or a PR, or email me: matthew[at]matthewsetter.com.