midway is a free, open source build & deployment project written in TypeScript and released under MIT. It has 7,742 GitHub stars, 585 forks and 118 open issues, and was last pushed 8 hours ago. On this registry it ranks #19 of 59 tracked projects in Build & Deployment, with 5 head-to-head comparisons available.

What is midway?

What it is

Midway is an open-source Node.js framework for building serverless services, traditional applications, microservices, and mini-program backends. It is written in TypeScript and released under the MIT license, and it has been developed for roughly eight years, with the most recent push in September 2026. The project lives in the Node.js ecosystem and positions itself as a cloud-integrated framework for front-end and full-stack developers, with integrations for React and Vue.

The concrete problem it addresses is the split between front-end code and back-end deployment targets. Midway lets a developer write back-end logic with decorators and dependency injection, then deploy the same code to AWS, Alibaba Cloud, Tencent Cloud, Azure, or a traditional virtual machine or container. It also supports a "zero API call" development style in which front-end code invokes back-end functions directly in a React Hooks style, removing the need to hand-write and maintain a separate HTTP client layer. For teams that want one framework across serverless and conventional hosting, that removes the need to maintain two codebases.

Key capabilities

  • Full-scenario support for web applications, serverless and FaaS functions, microservices, and mini-program backends.
  • Decorator-based development with a dependency injection container for enterprise application structure.
  • Choice of Koa, Express, or Egg.js as the underlying web framework, with support for their ecosystem plugins.
  • Standalone integrations for Socket.io, gRPC, Dubbo.js, and RabbitMQ.
  • Cloud-integrated front-end development in a React Hooks style, where back-end functions are called directly without hand-written API calls.
  • Component-based extension mechanism for adding capabilities to the framework.
  • Full TypeScript support across the framework.

Who uses it and how

  • Teams deploying the same application to AWS, Alibaba Cloud, Tencent Cloud, Azure, or a traditional VM or container.
  • Full-stack developers building React or Vue front ends that call back-end functions directly instead of through a separate API client.
  • Enterprises building microservices or mini-program backends with decorators and dependency injection.
  • Developers who need Socket.io, gRPC, Dubbo.js, or RabbitMQ alongside a web framework.
  • Projects that adopt the community Cool-Admin permission management framework, which is listed as an example built on Midway.

Getting started

Scaffold a project with npm init midway, then enter the directory and run npm run dev to start development. Documentation and community resources are available at midwayjs.org.

When to use it — and when not to

Midway is a reasonable choice when an application must run both on serverless platforms and on conventional servers, since it avoids committing to a single cloud vendor. A self-hoster should expect to operate the surrounding infrastructure that the chosen deployment target requires, and should note that the README does not describe a hosted offering, so the framework itself is the only layer provided. The project carries 118 open issues and a single primary documentation site, so teams should weigh the maintenance load of a framework that spans several runtimes and cloud providers.

project readme (upstream, from github) — read inline

Midway Logo

Midway - 一个面向未来的云端一体 Node.js 框架

GitHub license GitHub tag Build Status Test Coverage lerna PRs Welcome Gitpod Ready-to-Code Code Style: MidwayJS Leaderboard

English | 简体中文

资源

特性

  • 🐘 全功能:支持 Web 应用/Serverless/FaaS/微服务/小程序后端等多种场景,基于装饰器和依赖注入开发企业级应用
  • 🐦 前端集成:全新的云端一体应用研发体验,零 API 调用,使用 "React Hooks " 风格一体研发
  • 🐴 跨平台:支持部署至普通 Server 或 Serverless/FaaS 环境
  • 🐶 扩展:组件化扩展能力,另外支持使用 Koa/Express/Egg.js 生态插件
  • 🐂 示例: 官方提供多种场景的示例代码,方便开发者快速上手
  • 🛡 TypeScript 全面支持

描述

Midway 是一个适用于构建 Serverless 服务,传统应用、微服务,小程序后端的 Node.js 框架。

Midway 可以使用 Koa,Express 或 Egg.js 作为基础 Web 框架。它还提供了独立使用的基本解决方案,例如 Socket.io,GRPC,Dubbo.js 和 RabbitMQ 等。

此外,Midway 也适用于前端/全栈开发人员的 Node.js 无服务器框架。构建下一个十年的应用程序。可在 AWS,阿里云,腾讯云和传统 VM /容器上运行。与 React 和 Vue 轻松集成。 🌈

Demo

使用装饰器开发 Web 应用

import { Controller, Get, Provide } from '@midwayjs/decorator';

@Provide()
@Controller('/')
export class HomeController {

  @Get('/')
  async home() {
    return `Welcome to midwayjs!`;
  }
}

使用函数开发全栈应用

后端代码 src/apis/lambda/index.ts

import {
  Api,
  Get,
  Query,
  useContext,
} from '@midwayjs/hooks';

export default Api(
  Get(),
  Query<{
    page: string;
    limit: string;
  }>(),
  async () => {
    const ctx = useContext();
    return {
      page: ctx.query.page,
      limit: ctx.query.limit,
    };
  }
);

前端调用 src/page/index.tsx

import getArticles from './api';
const response = await getArticles({
  query: { page: '0', limit: '10' },
});
console.log(response); // { page: '0', limit: '10' }

手动调用

fetch('/api/articles?page=0&limit=10')
  .then((res) => res.json())
  .then((res) => console.log(res)); // { page: '0', limit: '10' }

快速上手

$ npm -v

## 选择模版
$ npm init midway

## 进入项目路径
cd my_midway_app && npm run dev

文档和社区

社区优秀示例展示

1、Cool-Admin - 一个很酷的后台权限管理框架

image

VSC Plugin

答疑

群里会有热心的朋友,也会有新版本发布推送。

贡献

请告知我们可以为你做些什么,不过在此之前,请检查一下是否有 已经存在的Bug或者意见

如果你是一个代码贡献者,请参考代码贡献规范。

谁在使用

image 你也想加 Logo ?可以点击 这里 添加。

License

我们的代码使用 MIT 协议,请放心使用。

FOSSA Status

Frequently asked questions

Is midway free to use?

midway is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does midway do?

🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and tra

What is midway written in?

midway is primarily written in TypeScript. Its source is publicly available at https://github.com/midwayjs/midway, and it has 7,742 GitHub stars.