Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Webhosting with Perl/CGI

by Your Mother (Chancellor)
on Jun 07, 2012 at 14:30 UTC ( #974966=note: print w/ replies, xml ) Need Help??


in reply to Webhosting with Perl/CGI

What ww said, though you don't even need a "real" webserver at this point.

File hai.cgi

#!/usr/bin/env perl use strictures; use CGI qw(:standard); print header(), start_html("OHAI"), h1("HAI DER"), blockquote("I CAN HAZ SEE GEE AIEE?"), p("KTHXBAI!"), end_html();

Command line-

moo@cow[201]~>plackup -L Shotgun -p 8080 -MPlack::App::WrapCGI -e 'Pla +ck::App::WrapCGI->new(script => "/home/moo/hai.cgi")' # HTTP::Server::PSGI: Accepting connections at http://0:8080/

Then visit your CGI at something like http://localhost:8080 depending on your box.

Helpful reading


Comment on Re: Webhosting with Perl/CGI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-07-06 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls