Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
parf committed Mar 22, 2018
1 parent 115a101 commit cfb2e8a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
5 changes: 5 additions & 0 deletions SampleApp/init.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

define("APP_DIR", __DIR__);
include dirname(__DIR__)."/init.php"; // project init
# include dirname(__DIR__, 2)."/init.php"; // Project/app-group/app init
11 changes: 11 additions & 0 deletions SampleApp/src/action/Root.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?
namespace SampleApp\action;

class Root extends \hb\Action {

function index() {
echo "index";
$this["x"] = "xxx";
}

}
4 changes: 2 additions & 2 deletions etc/nginx/conf.d/hb.conf → etc/nginx/conf.d/SampleApp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ server {
listen 80;
server_name hb.ws;

set $SITE "hb";
set $ROOT "/proj/$SITE";
set $APP "SampleApp";
set $ROOT "/proj/$APP";
root "$ROOT/www";

# nginx behind nginx
Expand Down
4 changes: 0 additions & 4 deletions hb/init.php

This file was deleted.

6 changes: 6 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
if (! defined("APP_DIR"))
define("APP_DIR", __DIR__);
define("PROJECT_DIR", __DIR__);
include __DIR__."/vendor/homebase2/src/homebase-bundle.inc.php"; // homebase project init
\hb\HB::dispatch();
1 change: 1 addition & 0 deletions src/SampleApp

0 comments on commit cfb2e8a

Please sign in to comment.