Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974966]
[erix]: hm nice might do a spot of diving - Red Sea is said to be beautiful
[LanX]: well too many terrorist tourists
[erix]: I guess I can pass for a native
[LanX]: talking about destruction of diving spots
[LanX]: Nodes to consider
[erix]: oops - got to run, see you later
[robby_dobby]: erix: 'appy day'ving

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2017-04-24 16:20 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.