Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/PuShaoWei/easy-php into P…
Browse files Browse the repository at this point in the history
…uShaoWei-master
  • Loading branch information
TIGERB committed Aug 28, 2017
2 parents bd05f1e + 1be8555 commit a403347
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
********************************************/

// 载入框架运行文件
require('../framework/run.php');
require(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'framework/run.php');
23 changes: 17 additions & 6 deletions run
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
#! /bin/bash
# Run this framework demo

# get os version
os=$(uname -a | awk 'BEGIN{FS=" "} {print $1}')

# step 1
yarn install

# step 2
DOMAIN=http://localhost:60000 npm run demo

# step 3
# mac os
open "http://localhost:60000/index.html"
# linux os
xdg-open "http://localhost:60000/index.html"
if [[ "$os" == "Darwin" ]]
then
# mac os
open "http://localhost:60000/index.html"
else
if [[! -f "/usr/bin/xdg-open"]]
then
echo "Install xdg-open, input your password:"
sudo apt-get install snapd-xdg-open
fi
# debian os
xdg-open "http://localhost:60000/index.html"
fi

# step 4
cd public && php -S localhost:60000

cd public && php -S "localhost:60000"

0 comments on commit a403347

Please sign in to comment.