PHP Backend for a simple todo application
This project uses symfony/http-foundation
to handle requests and responses.
bramus/router
is the fantastic router package used to handle all the routing.
The infamous Eloquent ORM (illuminate/database
) is used to handle database queries, relationships and migrations.
It can be debated that and ORM and a separate Router package is overkill for a small project like this,
but these are battle tested packages that increases security, code readability and extensibility.
- Copy the
.env.example
file to.env
JWT_KEY
is needed to encode and verify JWT tokens. Use a random string.- Update Database credentials.
- Run
php database/migrate.php
from command line to initialize the database. - A demo account with email
admin@admin.com
and passwordsecret
is automatically created and ready to use. - You can run
php -S localhost:8080
which will start a development server atlocalhost:8080
. Any free port can be used.