# express-ts-typeorm-template **Repository Path**: luoriwusheng/express-ts-typeorm-template ## Basic Information - **Project Name**: express-ts-typeorm-template - **Description**: 模版仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-08-14 - **Last Updated**: 2025-04-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 模版 ### 技术栈 - express - mysql2 - [typeorm](https://typeorm.io/) - typescript - ts-node 加载并执行ts文件 [ts-node 注意事项](./ts-node) - nodemon 监听文件变化 - dotenv 读取环境变量 ### 接入typeorm + ts装饰器 ```shell pnpm add typeorm reflect-metadata -D pnpm add typescript @types/node -D ``` 在入入口引入 ```js import 'reflect-metadata' ``` ### 开发环境 ```shell pnpm run dev ``` ### 生产构建 ```shell pnpm run build 本地运行 cd dist node app.js ```