Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Hoppscotch | 51,786 | 1 | 17 hours ago | 1 | March 22, 2022 | 150 | mit | TypeScript | ||
👽 Open source API development ecosystem - https://hoppscotch.io | ||||||||||
Postgraphile | 11,955 | 76 | 99 | 7 days ago | 156 | May 25, 2022 | 67 | mit | TypeScript | |
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database! | ||||||||||
Up | 8,687 | 68 | 13 | 3 months ago | 11 | March 02, 2018 | 291 | mit | Go | |
Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS. | ||||||||||
Vscode Restclient | 4,323 | a month ago | 431 | mit | TypeScript | |||||
REST Client Extension for Visual Studio Code | ||||||||||
Vulcain | 3,358 | 2 | 4 months ago | 15 | October 14, 2021 | 22 | agpl-3.0 | Go | ||
Fast and idiomatic client-driven REST APIs. | ||||||||||
Use Http | 2,277 | 5 | 29 | 17 days ago | 101 | September 12, 2022 | 85 | mit | TypeScript | |
🐶 React hook for making isomorphic http requests | ||||||||||
Best Of Web Python | 1,914 | 6 days ago | 1 | cc-by-sa-4.0 | ||||||
🏆 A ranked list of awesome python libraries for web development. Updated weekly. | ||||||||||
Awesome Asgi | 1,296 | a day ago | 11 | cc0-1.0 | Python | |||||
A curated list of awesome ASGI servers, frameworks, apps, libraries, and other resources | ||||||||||
Dream | 1,138 | 3 days ago | 93 | mit | OCaml | |||||
Tidy, feature-complete Web framework | ||||||||||
Siler | 1,126 | 19 | 8 | a year ago | 43 | January 27, 2021 | 28 | mit | ||
⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions. |
I'm afraid that I'm not being able to keep Siler up-to-date as it deserves, so it's repository has been archived.
As an alternative for Siler, something lightweight and simple that works as a library with Swoole out-of-the-box, I highly recommend Nano! Check it out: https://nano.hyperf.wiki/#/en/
Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP.
Flat files and plain-old PHP functions rocking on a production-grade, high-performance, scalable, concurrent and non-blocking HTTP server.
composer require leocavalcante/siler
That is it. Actually, Siler is a library, not a framework (maybe a micro-framework), the overall program flow of control is dictated by you. So, no hidden configs or predefined directory structures.
use Siler\Functional as ; // Just to be cool, don't use non-ASCII identifiers ;)
use Siler\Route;
Route\get('/', \puts('Hello, World!'));
Nothing more, nothing less. You don't need even tell Siler to run
or something like that (puts
works like a lazily evaluated echo
).
use Siler\Route;
use Siler\Http\Response;
Route\get('/', fn() => Response\json(['message' => 'Hello, World!']));
The Response\json
function will automatically add Content-type: application/json
in the response headers.
Siler provides first-class support for Swoole. You can regularly use Route
, Request
and Response
modules for a Swoole HTTP server.
use Siler\Http\Response;
use Siler\Route;
use Siler\Swoole;
$handler = function () {
Route\get('/', fn() => Response\json('Hello, World!'));
};
$port = 8000;
echo "Listening on port $port\n";
Swoole\http($handler, $port)->start();
Install peer-dependency:
composer require webonyx/graphql-php
type Query {
hello: String
}
use Siler\Route;
use Siler\GraphQL;
$type_defs = file_get_contents(__DIR__ . '/schema.graphql');
$resolvers = [
'Query' => [
'hello' => fn ($root, $args, $context, $info) => 'Hello, World!'
]
];
$schema = GraphQL\schema($type_defs, $resolvers);
Route\post('/graphql', fn() => GraphQL\init($schema));
Another peer-dependency:
composer require doctrine/annotations
Then:
/**
* @\Siler\GraphQL\Annotation\ObjectType()
*/
final class Query
{
/**
* @\Siler\GraphQL\Annotation\Field()
*/
public static function hello($root, $args, $context, $info): string
{
return 'Hello, World!';
}
}
use Siler\GraphQL;
use Siler\Route;
$schema = GraphQL\annotated([Query::class]);
Route\post('/graphql', fn() => GraphQL\init($schema));
Object type name will be guessed from class name, same for field name, and it's return type (i.e.: PHP string
scalar ===
GraphQL String
scalar).