shan
shan

Reputation: 3165

How to set up a simple test web server?

I'm a bit new to php so I've never dealt with test servers before, but with the release of Google's Polymer project I now need a test server in order to go through their tutorial, so here it goes!

I use Intellij for all of my web coding and am having trouble trying to get a test server up and running. I'm on OSX and have downloaded things such as MAMP but can't seem to get the test server actually.. running with Intellij. Or know how to view my website on the test server with Intellij. I've looked up so many guides but just can't seem to figure it out.

Any help? Even a link to something useful? Please!

Thank you for any help!

Upvotes: 0

Views: 238

Answers (1)

metacubed
metacubed

Reputation: 7301

You can start up a simple HTTP server for debugging purposes from any directory, if you have Python installed. Run:

$ python -m SimpleHTTPServer 8000

Now you can access the directory as a web site directory using:

http://localhost:8000

You'll need better alternatives as you explore more advanced stuff, but this works just fine as a starting point.

Upvotes: 1

Related Questions