Installation
There are multiple ways to install & run neoan3. We will assume a local LAMP throughout this documentation if not otherwise stated.
In general, make sure your system is equipped with the prerequisites before you start.
Using the CLI tool
You don't have to use the cli tool, but it greatly simplifies your work with neoan3 and automates many otherwise manual processes.
First, create and enter your project directory. For local development, creating your project directly where your localhost would serve it is fine.
Unlike many other cli helpers, neoan3-cli will always run in context of the application-root. For a given installation, you want to be in the directory itself.
Example: Assuming you want to run your application at http://localhost/myProject/
C:\xampp\htdocs\myProject>|
Correct starting point
C:\xampp\htdocs>|
Wrong starting point
neoan3 new app [myProject]
When in the desired context, run neoan3 new app myProject
. The last parameter is used for .htaccess routing and should match the directory you are in.
This is interesting to note as in a deployment scenario changes to the .htaccess are very likely. (In almost all cases a change of `RewriteBase` will suffice)
You should already have a running instance at this point.
You may check so by visiting http://localhost/myProject
if you are running a local apache or
http://localhost:8080
after running neoan3 develop
The file default.php
defines your default endpoint (home page) and 404 controller (optional). Let's create our own home page. Go back to your console:
neoan3 new component home
neoan3 set default_ctrl home
You can open the file default.php and make changes manually as well.
While here, let's get a first impression of the routing mechanism. Visit http://localhost/myProject/demo
Trouble?
Sometimes composer is unable to run silently. If you get an error message from composer, please run composer update
after installation. It might be necessary to delete the vendor folder first.
Another common problem are permissions or PATH-variable issues with composer, npm or GIT. Such issues exceed this documentation, but help can easily be found online.
These issues can also lead to the cli tool not being triggered. If "neoan3" is an unknown command to your system, please ensure proper installation.
Manual installation
You may also clone the main repository or download a package from https://github.com/neoan3/neoan3.
You will have to run composer after download & possible extraction.