this is one painless way to get started, which maybe needs tweaking for Windows (im on linux)
open a terminal
conform where we are :
Code:
bash-5.0$ pwd
/home/andrew
move context of terminal to Desktop:
install an appstarter directory on Desktop , with no extra (unit test etc)
Code:
bash-5.0$ composer create-project codeigniter4/appstarter --no-dev
(i can just use "composer" because i set up so that composer evokes composer.phar
you can do that and make it global using terminal :
say composer.phar is on your Desktop use as root command below or add "sudo"
Code:
mv composer.phar /usr/local/bin/composer
refer to :
https://getcomposer.org/
basically it will be something like :
Code:
php composer.phar <command>
when composer has successfully downloaded; you will have following directory structure:
Code:
appstarter
├── README.md
├── app
├── builds
├── composer.json
├── composer.lock
├── env
├── license.txt
├── phpunit.xml.dist
├── public
├── spark
├── tests
├── vendor
└── writable
lets fire it up
confirm where terminal is:
Code:
bash-5.0$ pwd
/home/andrew/Desktop
now lets move inside appstarter directory:
cd appstarter
fire up :
[CODE]
bash-5.0$ php spark serve
CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-10-20 05:52:55am
CodeIgniter development server started on http://localhost:8080
Press Control-C to stop.
[Tue Oct 20 11:52:55 2020] PHP 7.4.1 Development Server (http://localhost:8080) started
Couple of things @Crevitz if you follow above using spark server, you will find Welocome to Codeigniter page at : http://localhost:8080
if you have codeigniter in Apache xampp you need to point "listening" so that it uses public folder.
Codeigniter already has a .htaccess in public . The only time i needed to touch it was when going from http to https on live server.
The difference between using --no-dev is that if you don't use it you get a load of extra stuff.
if you do not use it and find actually you don't need it you can always get rid of it using :
Code:
composer update --no-dev
the url to see the home page is just :
http://localhost:8080
no need for http://localhost:8080/project
check directory structure
The other thing i was going to mention is this: You might say fine , having that on my Desktop but i can not really do any development can i, since i will be using a database. So i will have to move it to Apache or Xampp. Not quite true . MySql Maria etc need a database daemon/server what ever you want to call it , but sqlite3 does not. sqlite3 is serverless and is just a file. I put mine in the writable directory. If you get sqlitebrowser you can view fields data in a basic gui and even create a databse, table. sqlite3 has a capacity of 281 terabytes so it should be more than enough .
But MySQl is secure and sqlite3 doesn't use passwords ! well take it from me Wordpress uses MySQL and stores admin user name and passwords in a table called users. A lot of Wordpress sites are vulnerable nether-the-less.