view release on metacpan or search on metacpan
bin/webdyne.psgi view on Meta::CPAN
# Set DOCUMENT_DEFAULT
#
$DOCUMENT_DEFAULT=$ENV{'DOCUMENT_DEFAULT'} || $DOCUMENT_DEFAULT;
# All done. Start endless loop if called from command line or return
# handler code ref.
#
if (!caller || exists $ENV{PAR_TEMP}) {
# Running from command line without being stared by plackup or starman
#
require Plack::Runner;
my $plack_or=Plack::Runner->new();
# User specified --test on command line ? Note and consume before
# passing to parse_options ?
#
my $test_fg;
if ($test_fg=grep {/^--test$/} @ARGV) {
bin/webdyne.psgi view on Meta::CPAN
WebDyne::Constant->import(File::Spec->catfile($root_dn, sprintf('.%s', $WEBDYNE_CONF_FN)));
}
# Build a Plack::Build ref if there is middleware requested
#
sub handler_static {
# Used when starting webdyne.psgi from command line without plackup or via starman - presumably for dev
# purposes so include the Plack static middleware to allow serving non-psp files such as css
#
my ($handler_cr, @param)=@_;
if (my $qr=$WEBDYNE_PSGI_MIDDLEWARE_STATIC) {
my $root_dn;
if (-f $DOCUMENT_ROOT) {
# DOCUMENT_ROOT is actually a file. Get the directory name
#
require File::Basename;
$root_dn=&File::Basename::dirname($DOCUMENT_ROOT)
doc/webdyne.md view on Meta::CPAN
# Start with some Plack middleware added
#
DOCUMENT_ROOT=./time.psp plackup -e 'enable Plack::Middleware::Debug' `which webdyne.psgi`
The above starts a single-threaded web server using Plack. To start the
more performant Starman server (assuming installed):
# Start Starman instance. Substitute port + document root and location of webdyne.psgi
# as appropriate for your system.
#
$ DOCUMENT_ROOT=/var/www/html starman --port 5001 /usr/local/bin/webdyne.psgi
!!! note
Plack (via `webdyne.psgi` or `plackup`) and Starman versions of WebDyne
serve basic static files such as css, js, jpg etc. If you want more
control over non PSP files you should us best practices for service such
files via a traditional web server front end. Also note the Starman and
plackup instances of WebDyne do not support the --test option or
indexing - it assumes you are running in a production environment and
have checked everything with the Plack implementation of `webdyne.psgi`
doc/webdyne.md view on Meta::CPAN
: Usage: `wddebug --status|--enable|--disable`. Enable/disable
debugging in the WebDyne code. This uses some pretty ugly methods to
enable debugging in already installed modules by editing the code
on-disk to re-enable debug calls - do not use in a production
environment !
`webdyne.psgi`
: Used to run WebDyne as a PSGI process- usually invoked by Plack via
plackup or starman, but can be run directly for development
purposes.
`wdlint`
: Run `perl -c -w` over code in \_\_PERL\_\_ sections on any PSP file
to check for syntax errors. Will automatically skip HTML code. It
only checks code in the \_\_PERL\_\_ area, and won't check syntax in
in-line perl, dynamic attributes etc.
## Other files referenced by WebDyne
docker/Dockerfile view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.alpine view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.alpine-development view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.debian view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.fedora view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.perl view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/Dockerfile.tt view on Meta::CPAN
# Set document root environment var to the server_time example
#
ENV DOCUMENT_ROOT=${DOCUMENT_ROOT}
# WebDyne environment vars
#
ENV WEBDYNE_CACHE_DN=${PERL_CARTON_PATH}/cache
# Entrypoint script for starting process. Kicks off starman on ${PORT}
#
COPY docker/entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Empty cmd, entrypoint script runs "starman --port ${PORT} ${PERL_CARTON_PATH}/bin/webdyne.psgi ${DOCUMENT_ROOT}"
#
CMD []
docker/entrypoint.sh view on Meta::CPAN
#
if [ -f ./cpanfile ]; then
cpanm --installdeps .
fi
# hands off to the real command overridden
#
if [ $# -gt 0 ]; then
exec "$@"
else
exec starman -MWebDyne --port "$PORT" $PERL_CARTON_PATH/bin/webdyne.psgi
fi
lib/WebDyne/Request/PSGI/Constant.pm view on Meta::CPAN
DOCUMENT_DEFAULT => 'app.psp',
# File to use for indexing
#
WEBDYNE_PSGI_INDEX => 'index.psp',
# Middeware config, static module. Loaded by default for convenience if
# started via webdyne.psgi script directly (i.e. not invoked by plakup
# or starman). Activate in middleware section below if wanted with plackup
# or starman
#
# Serve any static file except .psp
#
#WEBDYNE_PSGI_MIDDLEWARE_STATIC => qr{^(?!.*\.psp$).*\.\w+$},
#
# Just common files
#
WEBDYNE_PSGI_MIDDLEWARE_STATIC => qr{\.(?:css|js|jpg|jpeg|png|gif|svg|ico|woff2?|ttf|eot|otf|webp|map|txt|inc|htm|html)$}i,