wdlndfx/artemis
Composer 安装命令:
composer require wdlndfx/artemis
包简介
description
README 文档
README
Artemis->php
An Express.js like router for php
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
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-03-14