Zox.js
Service-Oriented Web Framework.
Build scalable web apps and services with React and GraphQL or generate Static Sites.
Get started with a new project:
npm i zox zox-plugins
Add support for GraphQL:
npm i graphql-plugins zox-graphql-ws
Render React Components on the Server-Side:
npm i zox-react
Use handlebars templates:
npm i zox-handlebars
A simple controller
Controllers implement a handle()
method that returns a Response
object
which will be in charge of sending the HTTP response.
Page controller
A PageController
is a base controller class
that returns our page in a RenderResponse
.
As the name suggests this class will render our template
and add the required js, css and meta tags,
before sending the response.
A simple API
Creating API endpoints is as simple as
creating a controller that returns a JsonResponse
.
GraphQL resolvers
With GraphQL we get to explicitly define types of inputs and outputs of our endpoints.
React SPA
You can simply return a ReactRenderable
with your App
component
and continue with your regular React workflow.