Skip to content

Latest commit

 

History

History
28 lines (15 loc) · 800 Bytes

README.md

File metadata and controls

28 lines (15 loc) · 800 Bytes

Hack-REST-API-Example

Example of a REST API For Hack Lang using Hack Router

To install HHVM and Hack, see installation

Running The Server

Install dependencies (Using Composer):

composer install

Run:

hhvm -c config.ini -m server -p 8080

NOTE: If you are using Linux, you need to edit the configuration file to replace any instance of /usr/local/etc/hhvm/ with /etc/hhvm/

The server will then be running on port 8080

Routes Included In This Project

GET / : returns a message about a get request to the homepage

POST / : returns a message about a post request to the homepage

GET /example/{param} : returns a message with the param