view release on metacpan or search on metacpan
% dir=${dwarf_cloned_dir}
% mkdir hello_world
% perl ${dir}/bin/dwarf --share_dir=${dir}/share --output=. hello_world
created ./hello_world/app
created ./hello_world/htdocs
## èµ·å
ããã©ã«ãã§ã¯ plackup ã§èµ·åãã¾ãã<br />
ãªãã·ã§ã³ -m ã« production ã¨æå®ãããã¨ã§ starman ã§èµ·åãã¾ãã<br />
ãã®èµ·åã¹ã¯ãªããã¯èªç±ã«ç·¨éãã¦ä½¿ããããã¨ãæ³å®ãã¦ãã¾ãã
% cd hello_world/app
% ./script/start_searver.sh
## ããã¸ã§ã¯ãæ§é
Dwarf ã¯ãããã¸ã§ã¯ãæ¯ã«ä½¿ãæ¨ã¦ããã¨ããææ³ã§ä½ããã¦ãã¾ãã<br />
ãã£ã¦ãã¬ã¼ã ã¯ã¼ã¯æ¬ä½ããã¼ã«ã«ã«ç½®ãããã®ãç¹å¾´ã§ãã
examples/helloworld/app/script/start_server.sh view on Meta::CPAN
#!/bin/sh
ROOT=${0%/*}/..
PID=$ROOT/starman.pid
PSGI=$ROOT/app.psgi
HOST=0.0.0.0
PORT=11022
MODE=debug
LOCAL=NO
USE_CARTON=0
# ãªãã·ã§ã³ããã³ããªã³ã°
while getopts m:lch opt
do
examples/helloworld/app/script/start_server.sh view on Meta::CPAN
;;
l ) LOCAL=YES
;;
c ) USE_CARTON=1
;;
h ) echo '% ./start_server.sh [<option>]
version 1.0
option:
-m mode
if you pass production then this run starman. if not, this run plackup'
exit
;;
? ) echo 'Usage -h'
exit
;;
esac
done
if [ ${LOCAL} = 'YES' ]
then
examples/helloworld/app/script/start_server.sh view on Meta::CPAN
fi
if [ ${USE_CARTON} = '1' ]
then
CARTON="local/bin/carton exec"
fi
cd $ROOT
if [ ${MODE} = 'production' ]
then
$CARTON starman -I local/lib/perl5 -I lib -l $HOST:$PORT --pid $PID $PSGI
else
$CARTON plackup -I local/lib/perl5 -I lib -R lib,tmpl --host $HOST --port $PORT $PSGI
fi
examples/test-validate-json-body/app/script/start_server.sh view on Meta::CPAN
#!/bin/sh
ROOT=${0%/*}/..
PID=$ROOT/starman.pid
PSGI=$ROOT/app.psgi
HOST=0.0.0.0
PORT=11022
MODE=debug
LOCAL=NO
USE_CARTON=0
# ãªãã·ã§ã³ããã³ããªã³ã°
while getopts m:lch opt
do
examples/test-validate-json-body/app/script/start_server.sh view on Meta::CPAN
;;
l ) LOCAL=YES
;;
c ) USE_CARTON=1
;;
h ) echo '% ./start_server.sh [<option>]
version 1.0
option:
-m mode
if you pass production then this run starman. if not, this run plackup'
exit
;;
? ) echo 'Usage -h'
exit
;;
esac
done
if [ ${LOCAL} = 'YES' ]
then
examples/test-validate-json-body/app/script/start_server.sh view on Meta::CPAN
fi
if [ ${USE_CARTON} = '1' ]
then
CARTON="local/bin/carton exec"
fi
cd $ROOT
if [ ${MODE} = 'production' ]
then
$CARTON starman -I local/lib/perl5 -I lib -l $HOST:$PORT --pid $PID $PSGI
else
$CARTON plackup -I local/lib/perl5 -I lib -R lib,tmpl --host $HOST --port $PORT $PSGI
fi
share/app/script/start_server.sh view on Meta::CPAN
#!/bin/sh
ROOT=${0%/*}/..
PID=$ROOT/starman.pid
PSGI=$ROOT/app.psgi
HOST=0.0.0.0
PORT=11022
MODE=debug
LOCAL=NO
USE_CARTON=0
# ãªãã·ã§ã³ããã³ããªã³ã°
while getopts m:lch opt
do
share/app/script/start_server.sh view on Meta::CPAN
;;
l ) LOCAL=YES
;;
c ) USE_CARTON=1
;;
h ) echo '% ./start_server.sh [<option>]
version 1.0
option:
-m mode
if you pass production then this run starman. if not, this run plackup'
exit
;;
? ) echo 'Usage -h'
exit
;;
esac
done
if [ ${LOCAL} = 'YES' ]
then
share/app/script/start_server.sh view on Meta::CPAN
fi
if [ ${USE_CARTON} = '1' ]
then
CARTON="local/bin/carton exec"
fi
cd $ROOT
if [ ${MODE} = 'production' ]
then
$CARTON starman -I local/lib/perl5 -I lib -l $HOST:$PORT --pid $PID $PSGI
else
$CARTON plackup -I local/lib/perl5 -I lib -R lib,tmpl --host $HOST --port $PORT $PSGI
fi