Skip to content

voku/weather-demo

Repository files navigation

Build Status codecov.io

Weather App (Demo)

Intro

This demo project is running with middleware concept (PSR-15: HTTP Server Request Handlers):

Files

  • /bin/* -> command line scripts
  • /database/* -> the sqlite database itself
  • /public/* -> public web server directory (css, images, ...)
  • /src/* -> php code
  • /src/framework/* -> meta code
  • /src/framework/DependencyInjection.php -> dependency injection definition
  • /src/framework/routing/HttpRouting.php -> http routing definition
  • /src/modules/* -> something like packages
  • /src/modules/*/commands/* -> cli commands
  • /src/modules/*/entities/* -> data objects
  • /src/modules/*/repositories/* -> data sources
  • /src/modules/*/services/* -> services that works with data

Quick start

1. Install the database. ;)

cp database/_weather.db database/weather.db

2. start the application

2.1 development

you can just use the build in webserver from php:

php8.2 -S localhost:8080 -t public/

2.2 production

you need to point the root path to the public directory (e.g. for nginx: root /var/www/weather-demo.suckup.de/web/public;) and you need to pass all requests to this path (e.g. for nginx: if (!-e $request_filename){ rewrite (.*) /index.php?$query_string; })

Releases

No releases published

Packages

No packages published