Launch a quick PHP web-server for dev/tests
If you run PHP >= 5.4 you can do this (on the command line):
$> php -S localhost:9292
And it will start a web server in your current directory. This makes it easy to test backend json, responses, proxies etc etc. Of course, choose your own port
0 configuration + 0 Apache/Nginx = AWESOME
And as a bonus, if you do test some AJAX from another location, say a flat HTML file you might want to add this to your script:
header('Access-Control-Allow-Origin: *');
Written by Peter Peterson
Related protips
1 Response
nice!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#