2017 © Pedro Pelรกez
 

project mpcmf-web-app

image

mpcmf/mpcmf-web-app

  • Thursday, February 15, 2018
  • by greevex
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 9 % Grown

The README.md

mpcmf-webApp

mpcmf web application skeleton., (*1)

Use it to build new projects with based on mpcmf., (*2)

Ultra-fast web-server included! :), (*3)

Installation

install base application structure, (*4)

composer.phar create-project mpcmf/mpcmf-web-app:dev-master .

then install tested requirements, (*5)

composer.phar install

Usage

Console commands usage, (*6)

bin/mpcmf apps/defaultApp/console.php

Web server starts as single console command, (*7)

# Single process server
bin/mpcmf apps/defaultApp/console.php webServer:run --bind 0.0.0.0 --ports 8082

# Multi processes/ports server for usage with balancer (e.g. haProxy, nginx)
bin/mpcmf apps/defaultApp/console.php webServer:run --bind 127.0.0.1 --ports 8082,8083,8084,8085

# Multi processes/ports server with included balancer (8080 - master port)
bin/mpcmf apps/defaultApp/console.php webServer:run --bind 127.0.0.1 --ports 8082,8083,8084,8085 -m 0.0.0.0:8080

Do not forget to clean up cache after some updates! By default in /tmp/mpcmf, (*8)

Creating apps

Create new app in the apps directory. Default structure:, (*9)

apps                          # directory with all project applications
โ””โ”€โ”€ defaultApp
    โ”œโ”€โ”€ commands              # directory for console commands
    โ”‚ย ย  โ”œโ”€โ”€ test              # your custom console sub-namespace
    โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ something.php # custom command
    โ”‚ย ย  โ””โ”€โ”€ webServer         # webServer console command sub-namespace
    โ”‚ย ย      โ””โ”€โ”€ run.php       # webServer command
    โ”œโ”€โ”€ console.php           # console application with all application commands
    โ”œโ”€โ”€ defaultApp.php        # base application class
    โ”œโ”€โ”€ libraries             # directory for custom libraries
    โ”œโ”€โ”€ modules               # directory for application modules
    โ”‚ย ย  โ””โ”€โ”€ defaultModule     # single module
    โ”‚ย ย      โ”œโ”€โ”€ module.php    # base module class
    โ”‚ย ย      โ”œโ”€โ”€ routes.php    # some non-entity routes such as homepage
    โ”‚ย ย      โ”œโ”€โ”€ actions       # module actions, routes, acl settings related to entities
    โ”‚ย ย      โ”œโ”€โ”€ controllers   # mvc controllers
    โ”‚ย ย      โ”œโ”€โ”€ entities      # just meta-objects
    โ”‚ย ย      โ”œโ”€โ”€ mappers       # data mappers for storage, forms and relations
    โ”‚ย ย      โ”œโ”€โ”€ models        # mvc models
    โ”‚ย ย      โ”œโ”€โ”€ public        # some static files (do not accessible via http)
    โ”‚ย ย      โ””โ”€โ”€ templates     # mvc templates (module)
    โ””โ”€โ”€ templates             # another templates (application)

How fast is included web server? For example: info api /MODULE/ENTITY/api.getInfo 1.9ms, (*10)

Image, (*11)

Contact

Change environment options in environment.local.php file., (*12)

Please create issues for some bugs., (*13)

The Versions