sebacruz/baseapp

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Type:project

2.1.0 2018-01-10 20:05 UTC

This package is auto-updated.

Last update: 2024-04-08 06:25:58 UTC


README

Requirements

Setup

$ composer create-project sebacruz/baseapp app
$ npm install

Copy .env.dist file to .env and set your needed environment variables, like database credentials:

$ cp .env.dist .env
$ vi .env

If you don't set the APP_ENV variable it will be "production" by default.

Local Development Server

If you have PHP installed locally and you would like to use PHP's built-in development server to serve your application you may use the composer start command. This command will start a development server at http://0.0.0.0:8080:

$ composer run-script start

App routing

All routes are defined in src/routes.php.

App structure

The app is divided in a few directories:

  • public: public directory where you have to point your the domain. This is where you put public stuff, like the robots.txt, google verification files, etc.
  • src: php stuff goes here. The PHP autoloader will look here for the App namespace, for example: if you call the \App\Example\Class the autoloader will try to load the file src/Example/Class.php.
  • resources: contains assets sources and views. DO NOT PUT DEPENDENCIES (LIKE jQuery OR bootstrap) HERE, USE NPM FOR THAT.
  • vendor: php dependencies managed by composer.
  • node_modules: node dependencies managed by npm.

RTFM

This app depends on various projects, if you are having some troubles read the project's docs and if you can't solve it leave an issue.