![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
typescript-boot
Advanced tools
typescript-boot, This is a scaffolding that allows you to quickly start developing api interface services using typescript
typescript-boot
这是一个可以帮助你用typescript快速开发后端API接口服务的脚手架。同时支持通过注解生成完全可供前端同学开发参考的在线接口文档。
里面提供了包括session会话管理、权限管理、日志管理的开箱即用功能,同时又支持完全自定义这些管理器。
还提供了方便操作数据库的方式,支持各种数据库(支持mysql、达梦数据库、其他数据库也很方便可以实现)。对数据库的操作支持对象映射。
以下是一个简单示例:
更多功能可以参考这个完整的、可运行的示例:https://github.com/seeksdream/typescript-boot-demo
1,首先安装依赖
npm install typescript-boot
2,编写代码
// 首先,编写一个接口服务:
@apiDoc('权限认证') // 描述服务名称
@apiPermission(NoRequiredPermission) // 设置访问当前接口服务的前置条件,如无需登录、需要登录、仅限指定角色登录等
@apiPath('/account') //设置访问此服务下的接口的前缀路径
export default class AccountService extends BaseService{
@apiDoc('登录')
@apiReturn('会话token(string)') // 描述返回结果中数据内容
@apiPath('login') //结合服务路径/account,最终此接口的访问路径为:http://localhost:端口/account/login
async login(
@apiParamFromBody('登录账号') account:string, // 从body中获取account属性,并描述account的含义为:登录账号
@apiParamFromBody('登录密码(MD5)') password:string, // 从body中获取password属性,并描述password的含义为:登录密码
@apiRequest() req
) {
// TODO 实现接口内容
const token = '';
return this.success(token);
}
}
// 然后,在你的主程序中通过以下代码发布接口服务并启动
import 'reflect-metadata';
import {SeeksWebServer} from 'typescript-boot';
const port = 3333;
const server = new SeeksWebServer(port);
server.publishService(new AccountService()); // 注册一个api服务
server.start(); // 启动服务,然后就可以调用接口了
此刻,你的接口就可以被调用了。
同时,你还可以同通过以下链接来查看接口文档:
http://localhost:端口/typescript-boot
FAQs
typescript-boot, This is a scaffolding that allows you to quickly start developing api interface services using typescript
The npm package typescript-boot receives a total of 3 weekly downloads. As such, typescript-boot popularity was classified as not popular.
We found that typescript-boot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.