perl dancer 基础1

2022-03-25 14:24:55 浏览数 (1)

创建一个应用

首先创建一个用户(最好不要使用root的身份运行web app)

代码语言:javascript复制
[root@dancer-test ~]# tail -n 2 /etc/passwd
hunter:x:503:503::/home/hunter:/bin/bash
autotools:x:504:504::/home/autotools:/bin/bash
[root@dancer-test ~]# useradd dancer
[root@dancer-test ~]# tail -n 2 /etc/passwd
autotools:x:504:504::/home/autotools:/bin/bash
dancer:x:505:505::/home/dancer:/bin/bash
[root@dancer-test ~]# su - dancer 
[dancer@dancer-test ~]$ ls
[dancer@dancer-test ~]$ 

创建一个名字叫 TEST-APP 的应用

代码语言:javascript复制
[dancer@dancer-test ~]$ dancer2  version
Dancer2 0.163000
[dancer@dancer-test ~]$ dancer2  -a TEST::APP
  TEST-APP
  TEST-APP/Makefile.PL
  TEST-APP/MANIFEST.SKIP
  TEST-APP/cpanfile
  TEST-APP/config.yml
  TEST-APP/views
  TEST-APP/views/index.tt
  TEST-APP/views/layouts
  TEST-APP/views/layouts/main.tt
  TEST-APP/environments
  TEST-APP/environments/development.yml
  TEST-APP/environments/production.yml
  TEST-APP/t
  TEST-APP/t/002_index_route.t
  TEST-APP/t/001_base.t
  TEST-APP/bin
  TEST-APP/bin/app.psgi
  TEST-APP/public
  TEST-APP/public/404.html
  TEST-APP/public/dispatch.cgi
  TEST-APP/public/500.html
  TEST-APP/public/dispatch.fcgi
  TEST-APP/public/favicon.ico
  TEST-APP/public/javascripts
  TEST-APP/public/javascripts/jquery.js
  TEST-APP/public/images
  TEST-APP/public/images/perldancer-bg.jpg
  TEST-APP/public/images/perldancer.jpg
  TEST-APP/public/css
  TEST-APP/public/css/style.css
  TEST-APP/public/css/error.css
  TEST-APP/lib/TEST
  TEST-APP/lib/TEST/APP.pm
[dancer@dancer-test ~]$ ls
TEST-APP
[dancer@dancer-test ~]$ 

0 人点赞