How to setup:
- Download WAMP onto your local machine.
- Modify the
httpd.conf
which is located inwamp/bin/apache/Apache2.4.4/conf
. -Append this line to the end:Alias /users "c:/wamp/www/api/index.php"
- Create a folder and file named
c/wamp/www/api/index.php
- Place this code in
index.php
. (And obviously modify it to you needs.) - Restart your WAMP server. (Or start it if it's never been started.)
- Navigate to the URL
http://localhost/quotes
Note: You may need to tryhttp://localhost:80/quotes
orhttp://localhost:8080/quotes
if your server is configured as such. You may need to reconfigure wamp to accept connections on port 8080 because Skype defaults to 80. - Customize and enjoy! Use Postman to test it out.
Get the code here.
No comments:
Post a Comment