webman learning, testing.

Niels Bohr 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
.github 8eb134ee05 init 3 years ago
app 54663cc59e tested beanstalk-queue 3 years ago
config 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
db b8b758577f tested db migrate,rolback,seed 3 years ago
process 88f2d06826 tested crontab 3 years ago
public 8eb134ee05 init 3 years ago
resource 3a5d097111 tested multi language 3 years ago
runtime 8eb134ee05 init 3 years ago
support 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
tests e9adc73bca tested phpunit 3 years ago
.env_sample 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
.gitignore 9e2a49624e tested command 3 years ago
LICENSE 8eb134ee05 init 3 years ago
README.md 54663cc59e tested beanstalk-queue 3 years ago
composer.json 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
composer.lock 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
phinx b8b758577f tested db migrate,rolback,seed 3 years ago
phinx.sample.php 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
start.php 6ccf2e9e3c update: all denpendencies to latest version 2 years ago
windows.bat 8eb134ee05 init 3 years ago
windows.php 6ccf2e9e3c update: all denpendencies to latest version 2 years ago

README.md

webman testing project

  1. run as debug

php start.php start

  1. run as production

php start.php start -d

db migration

  1. composer install robmorgan/phinx offcial docs
  2. mkdir -p db/{migration,seeds}
  3. vendor/bin/phinx init
  4. vendor/bin/phinx create User
  5. Edit db/migration/***_user_.php
  6. vendor/bin/phinx migration -e dev
  7. test vendor/bin/phinx rollback -e dev

db seeds

  1. phinx seed:create UserSeeder -e dev
  2. Edit db/seeds/UserSeeder.php
  3. phinx seed:run -e dev
  4. 同 laravel 不一樣, created updated 這些字段並不會自動插入值

NOTICE

  1. 重復執行 3 會重復插入數據
  2. 3 所有插入爲同一個事務
  3. 3 事務執行失敗會引起ID自增 (pgsql)

Redis

see official doc

NOTICE

composer 安裝 並配置後,需要重啓: php start.php start

Cache

see official doc

NOTICE

  1. 需要重啓
  2. 配置文件爲 config/redis.php,實測和 Redis::xxx 共享配置

PHPUnit

  1. run vendor/bin/phpunit --bootstrap support/bootstrap.php tests/TestConnection.php
  2. change code in tests/TestConnection.php
  3. run again

Command

see official doc

Custormized Processes

see https://www.workerman.net/doc/webman/process.html

Middlewares

see official doc

Redis Queue

I18N

Websocket

Crontab