Skip to content

AppExpress 🚀

Published on: April 26, 2024


AppExpress 🚀

The new gen. functions on Appwrite support routes and headers and so many things, enhancing the flexibility and capabilities for developers. However, routing wasn't straightforward, as it required relying on multiple if/else or switch statements.

Recognising this, I present to you – AppExpress (Appwrite + Express.js) for Appwrite Functions. Functions have always been a powerful aspect of Appwrite, and with AppExpress, they just got even better.

I’ve worked enough with Express and hence I feel it's pretty easy & straightforward! So I created AppExpress with the same API logic.

AppExpress features –

  • Middlewares
  • Direct Navigation,
  • Router based Navigation,
  • Minimal DI support,
  • and ofc. Optimal Performance

Here’s a simple example –

javascript
// import AppExpress
import AppExpress from '@itznotabug/appexpress';

// create a new instance
const express = new AppExpress();

// create a `get` handler for path `/`
express.get('/', (_, response) => {
    response.send('Welcome to AppExpress!');
});

// attach to the appwrite function entrypoint
export default async (context) => await express.attach(context);

Checkout the repository for more info. on how to benefit the most out of AppExpress!

Make sure to also check the function directory to see a working example logic. Here’s a live action as well – https://appexpress.appwrite.global.

If you like the project, make sure to ⭐️ it on GitHub!


Update: So AppExpress was featured on Appwrite’s official YouTube channel & was explained by Dennis Ivy, take a look –

Darshan Pandya