Gathering detailed insights and metrics for egg-react-typescript-boilerplate
Gathering detailed insights and metrics for egg-react-typescript-boilerplate
Gathering detailed insights and metrics for egg-react-typescript-boilerplate
Gathering detailed insights and metrics for egg-react-typescript-boilerplate
Egg React TypeScript Server Side Render (SSR) / Client Side Render (CSR)
npm install egg-react-typescript-boilerplate
Typescript
Module System
Min. Node Version
Node Version
NPM Version
45.4
Supply Chain
80.1
Quality
67.4
Maintenance
25
Vulnerability
94.8
License
TypeScript (56.77%)
JavaScript (43.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
56 Stars
52 Commits
19 Forks
3 Watchers
6 Branches
1 Contributors
Updated on Sep 08, 2024
Latest Version
5.1.2
Package Id
egg-react-typescript-boilerplate@5.1.2
Unpacked Size
567.64 kB
Size
468.08 kB
File Count
82
NPM Version
10.7.0
Node Version
18.20.4
Published on
Sep 08, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
28
基于 Egg + React + TypeScript + Webpack 服务端渲染工程骨架
支持 Egg Node 端代码和前端代码 TypeScript 编写和构建
支持 Node 和 asyncData 方式获取数据进行渲染
支持多页面(MPA) 和 单页面(SPA) 服务端渲染(SSR)和前端渲染(CSR)
支持 AntD 按需加载和主题配置功能以及 MobX 应用
支持 Webpack 时时编译和热更新, npm run dev
一键启动应用
支持开发环境, 测试环境,正式环境 Webpack 编译
1npm install
1npm run dev
应用访问: http://127.0.0.1:7001
1npm run tsc
1npm run build
npm run tsc
和 npm run build
构建 TypeScript Egg 代码和 TypeScript 前端代码npm start
启动应用添加
${root}/app/web/page/demo.tsx
前端代码
1'use strict'; 2import React, { Component } from 'react'; 3class Demo extends Component<any, any> { 4 render() { 5 const { title, article } = this.props; 6 return <div> 7 <h1 className="easy-article-detail-title">{title}</h1> 8 <h3 className="easy-article-detail-title">{article.title}</h3> 9 <div>{article.content}</div> 10 </div>; 11 } 12} 13export default Demo;
添加
${root}/app/controller/demo.ts
Node 代码
1import { Controller, Context } from 'egg'; 2 3export default class DemoController extends Controller { 4 public async index(ctx: Context) { 5 const title = 'Node 直接获取渲染数据'; 6 const article = await ctx.service.article.query({ id: Number(id) }); 7 await ctx.render('demo.js', { title, article }); 8 } 9}
添加
${root}/app/router.ts
Egg 路由配置
1import { Application } from 'egg'; 2export default (app: Application) => { 3 const { router, controller } = app; 4 router.get('/demo', controller.demo.index); 5};
添加
${root}/webpack.config.js
新增页面 entry 配置
1module.exports = { 2 entry: { 3 demo: 'app/web/page/demo.tsx', 4 } 5}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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