Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = / (default value)

We suggest trying baseUrl =

Appolo

Node.js framework for building high performance scalable server side applications

Appolo provides clean and modern architecture which allows developers to build highly testable, scalable, loosely coupled, and easily maintainable applications

Get StartedView Source

The right way to write TypeScript applications

flare

Simple

Define and reuse modules and dependencies.

emoji_flags

Performance

Built from the ground up for performance and scale.

settings_input_component

Modular

easily extend your application with custom modules.

category

Organized

Better project code organization approach.

For TypeScript

Built with latest JavaScript features using TypeScript.

build

Dependency Injection

Powered by powerful Dependency injection makes your code elegant, easy to maintain and test.

account_tree

Zero external dependencies

All appollo core modules build for performance with zero external dependencies

code

Developer Friendly

Built for developer joy without sacrificing performance and stability.

The fastest way to get started

Checkout the examples page for full examples and use cases.

Install using npm or yarn

npm i --save @appolo/core

Create app

import { App } from "@appolo/node";
await App.create().launch();

Define your controllers

import { define, singleton, inject,factory,alias } from "@applo/inject";
import { controller, post,body } from "@applo/route"
@controller("/api/v1")
export class MailController {
@inject() private mailService:MailService;
@post("/send_mail")
public async sendMail(@body() mail: Mail) {
return mailService.send(message);
}
}

Define your services

@define()
@singleton()
export class MailService {
@inject() private mailProvider:IMailProvider;
public async send(message: Mail) {
//do some logic
message.from = "some@mail.com"
await mailProvider.send(message);
}
}

Define your factories

@factory()
export class MailProvider {
@inject() private env:IEnv;
@alias("IMailProvider") private mailProviders:IMailProvider[]};
public async get(message: Mail) {
return this.mailProviders.find(provider=>provider.type==this.env.mailProvider);
}
}

Checkout the more examples