Gathering detailed insights and metrics for @midwayjs/info
Gathering detailed insights and metrics for @midwayjs/info
Gathering detailed insights and metrics for @midwayjs/info
Gathering detailed insights and metrics for @midwayjs/info
npm install @midwayjs/info
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
7,410 Stars
4,005 Commits
576 Forks
102 Watching
35 Branches
169 Contributors
Updated on 28 Nov 2024
TypeScript (62.11%)
Shell (34.71%)
JavaScript (3%)
CSS (0.16%)
HTML (0.03%)
Cumulative downloads
Total Downloads
Last day
39%
139
Compared to previous day
Last week
52.5%
932
Compared to previous week
Last month
10.6%
4,004
Compared to previous month
Last year
49.8%
49,560
Compared to previous year
Midway - 一个面向未来的云端一体 Node.js 框架
English | 简体中文
Midway 是一个适用于构建 Serverless 服务,传统应用、微服务,小程序后端的 Node.js 框架。
Midway 可以使用 Koa,Express 或 Egg.js 作为基础 Web 框架。它还提供了独立使用的基本解决方案,例如 Socket.io,GRPC,Dubbo.js 和 RabbitMQ 等。
此外,Midway 也适用于前端/全栈开发人员的 Node.js 无服务器框架。构建下一个十年的应用程序。可在 AWS,阿里云,腾讯云和传统 VM /容器上运行。与 React 和 Vue 轻松集成。 🌈
1import { Controller, Get, Provide } from '@midwayjs/decorator'; 2 3@Provide() 4@Controller('/') 5export class HomeController { 6 7 @Get('/') 8 async home() { 9 return `Welcome to midwayjs!`; 10 } 11}
后端代码 src/apis/lambda/index.ts
1import { 2 Api, 3 Get, 4 Query, 5 useContext, 6} from '@midwayjs/hooks'; 7 8export default Api( 9 Get(), 10 Query<{ 11 page: string; 12 limit: string; 13 }>(), 14 async () => { 15 const ctx = useContext(); 16 return { 17 page: ctx.query.page, 18 limit: ctx.query.limit, 19 }; 20 } 21);
前端调用 src/page/index.tsx
1import getArticles from './api'; 2const response = await getArticles({ 3 query: { page: '0', limit: '10' }, 4}); 5console.log(response); // { page: '0', limit: '10' }
手动调用
1fetch('/api/articles?page=0&limit=10') 2 .then((res) => res.json()) 3 .then((res) => console.log(res)); // { page: '0', limit: '10' }
1$ npm -v 2 3## 选择模版 4$ npm init midway 5 6## 进入项目路径 7cd my_midway_app && npm run dev
1、Cool-Admin - 一个很酷的后台权限管理框架
群里会有热心的朋友,也会有新版本发布推送。
请告知我们可以为你做些什么,不过在此之前,请检查一下是否有 已经存在的Bug或者意见。
如果你是一个代码贡献者,请参考代码贡献规范。
你也想加 Logo ?可以点击 这里 添加。
我们的代码使用 MIT 协议,请放心使用。
No vulnerabilities found.
Reason
30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 4/23 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
32 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More