diff --git a/index.html b/index.html index a48b658..70a4a6b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,18 @@ -
The simple and fast micro framework for building reactive web applications with PHP. @@ -160,7 +168,8 @@
But that’s not all! - We are currently working on the documentation with all the details to give you a deep understanding of how everything works and how to build most common use-cases. + Take a look at our documentation + to get a deep understanding of how everything works and how to build most common use-cases.
Thanks to async programming, Framework X allows you to do multiple things at once. - On top of this, its built-in web server also utilizes the async execution model to process multiple incoming connections at once. + On top of this, its built-in web server also utilizes the async execution model to process multiple incoming connections at once. + We support fibers, coroutines, and promises. Your choice!
$app->get('/book/{id:\d+}', function (Psr\Http\Message\ServerRequestInterface $request) use ($db, $twig) {
- return $db->query(
- 'SELECT * FROM books WHERE ID=?',
- [$request->getAttribute('id')]
- )->then(function (array $row) use ($twig) {
- $html = $twig->render('book.twig', $row);
-
- return new React\Http\Message\Response(
- 200,
- [
- 'Content-Type' => 'text/html; charset=utf-8'
- ],
- $html
- );
- });
+$app->get('/book/{isbn}', function (Psr\Http\Message\ServerRequestInterface $request) use ($db) {
+ $isbn = $request->getAttribute('isbn');
+ $result = await($db->query(
+ 'SELECT title FROM book WHERE isbn = ?',
+ [$isbn]
+ ));
+
+ assert($result instanceof React\MySQL\QueryResult);
+ $data = $result->resultRows[0]['title'];
+
+ return new React\Http\Message\Response(
+ 200,
+ [],
+ $data
+ );
});
@@ -637,6 +647,7 @@
Framework X is scalable from the ground up.
We provide a simple API that is easy to get started with for the smallest of projects, yet allow to grow to complex, production-ready setups.
+ We're ready for PHP 8.1, but also support PHP 7.1+ with no extensions required!
@@ -654,7 +665,7 @@
Support running behind existing PHP stacks
-
- We support running behind existing PHP stacks using Apache, nginx or any other web server using CGI/FastCGI.
+ We support running behind existing PHP stacks using Apache, nginx or any other web server using CGI / FastCGI (PHP-FPM).
This means you can create a simple web application in minutes and run it anywhere from shared hosting to your own clustered server setup in the clouds.
diff --git a/src/og-image.png b/src/og-image.png
new file mode 100644
index 0000000..b730dfa
Binary files /dev/null and b/src/og-image.png differ