Instantly share code, notes, and snippets.

What would you like to do?

Building Modern APIs in Expressive

This tutorial has hands-on components where you can actually code along with me. You will get the most out of the session if you do this.

Firstly download the resources for this tutorial from

To work with the code, you need:

  • PHP 7.1+
  • SQLite
  • Composer

If you have these installed on your computer, then you can run:

$ unzip
$ cd api
$ php -S -t public/

Alternatively, you can use the supplied Vagrantfile to create a virtual machine that contains all the requirements.

  1. Install dependencies

  2. Unzip to a folder

  3. Using your terminal change directory to the folder you created by unzipping.

  4. Start the VM with vagrant up

In either case, you will edit the source files on your host machine using your PHP IDE or editor of choice. You may find it helpful to create a project for the api folder.

As a bonus, you can collect pp from []9 if you are working with curl outside the Vagrant VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment