mpcmf / mpcmf-web-app
Installs: 50
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 1
Type:project
Requires
- mpcmf/mpcmf-console: dev-master
- mpcmf/mpcmf-core: dev-master
- mpcmf/mpcmf-web: dev-master
This package is not auto-updated.
Last update: 2024-11-19 04:59:33 UTC
README
mpcmf web application skeleton.
Use it to build new projects with based on mpcmf.
Ultra-fast web-server included! :)
Installation
install base application structure
composer.phar create-project mpcmf/mpcmf-web-app:dev-master .
then install tested requirements
composer.phar install
Usage
Console commands usage
bin/mpcmf apps/defaultApp/console.php
Web server starts as single console command
# 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
Creating apps
Create new app in the apps
directory.
Default structure:
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
Contact
Change environment options in environment.local.php
file.
Please create issues for some bugs.