Skip to content

leonn00albert/Artemis

Repository files navigation

Artemis->php

An Express.js like router for php

Packagist Version Packagist GitHub Release Date GitHub issues

GitHub repo size GitHub contributors GitHub

Table of Contents

Features

  • 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

Installation

mkdir example
cd example
touch index.php
composer require  wdlndfx/artemis:dev-master

Usage

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

License

MIT License

Copyright (c) 2023 leonn00albert

About

An Express.js like router for php

Resources

License

Stars

Watchers

Forks

Packages

No packages published