Skip to main content

EzBackend - The Server

Overview

EzBackend

The EzBackend is the root EzApp. All other EzApps should be children of the EzBackend, and there should be only one EzBackend per application. A sample meetup app may look something like:

Sample-Meetup-App

We recommend following the instructions in Getting Started

Which creates the following boilerplate

default-plugins

const app = new EzBackend();

//---Plugins---
app.addApp(new EzOpenAPI());
app.addApp(new EzDbUI());
app.addApp(new EzCors());
//---Plugins---

app.start();

This basic boilerplate comes with three plugins to aid development

PluginDescriptionNotes
db-uiAn all in one interface for
1. Looking at your API endpoints
2. Managing your database
3. Testing your API endpoints
Requires EzOpenAPI plugin to be used as well
open-apiAutomatically generates documentation for your backend
corsPlugin for managing CORS, by default accepts requests from anywhereMake sure to change cors settings before deployment

Barebones

If you just want a barebones application, you can use the following

import { EzBackend } from "@ezbackend/common";

const app = new EzBackend();

app.start();
caution

However, this barebones application does not have alot of the functionality that EzBackend provides to make your life easier.