Zephyr is an API/Admin Framework for developers to serve a RESTful and/or GraphQL Interface based on a straight-forward API. It brings together the latest technologies and their speed to give you this functionality.
Dependent on Fastify for API, Pino for logging, Axios for external calls, and GatsbyJS for the admin panel.
yarn add zephyr-framework
Option 1: Just start it.
import zephyr from 'zephyr-framework';
zephyr().then(() => {
console.log('Server has started.');
});
Option 2: Start the server and admin with custom fastify server and listen options.
For serverOptions
and listenOptions
see https://github.com/fastify/fastify/blob/master/docs/Server.md. They match Fastify's options schema.
import { startAdmin } from 'zephyr-framework';
startAdmin({
serverOptions: {},
listenOptions: {},
}).then(startServer => startServer({
serverOptions: {},
listenOptions: {},
})).then(() => {
console.log('Server has started.');
});