Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Webhosting with Perl/CGI

by Your Mother (Canon)
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 scrutinizing the Monastery: (4)
As of 2014-07-26 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (179 votes), past polls