An Express.js like router for php
- Routing: Artemis provides a simple and intuitive routing mechanism. It allows you to define routes based on HTTP methods and URL patterns, making it easy to handle different endpoints and HTTP operations.
- Middleware: Artemis uses middleware functions to handle various aspects of request/response processing. Middleware functions can be used for tasks such as logging, authentication, error handling, parsing request bodies, and more. Express provides a rich ecosystem of built-in middleware as well as the ability to create custom middleware.
- Extensibility: Artemis is highly extensible, allowing you to add additional functionality through third-party middleware and librarie
mkdir example
cd example
touch index.php
composer require wdlndfx/artemis:dev-master
Quick Start:
inside index.php ->
<?php
require_once __DIR__.'/vendor/autoload.php';
use Artemis\Core\Router\Router;
$app = Router::getInstance();
$app->get("/", function($req,$res){
$res->send("<h1>Hello World!</h1>");
$res->status(200);
});
$app->listen("/", function(){
});
Start local server in terminal
php -S localocalhost:8000
MIT License
Copyright (c) 2023 leonn00albert