Skip to content

rgbjs/koa2-template

Repository files navigation

koa2-template

基于 koa2 构建的 nodejs 后端模版

说明

该项目是一个 nodejs + ts + koa2 + mysql 的后端项目模板

该项目模块化规范采用 ESModule

项目中配置了 router , mysql , JWT , log 等

项目推荐 nodejs 版本 >= 18

项目基于 ts 开发, 提供了完整的类型提示, 当然你也可以使用 js, 两者是可同时并存的

下载

使用 git

git clone https://github.com/rgbjs/koa2-template.git

使用

安装依赖

pnpm

pnpm i

yarn

yarn install

npm

npm i

开发模式

pnpm

pnpm run dev

yarn

yarn run dev

npm

npm run dev

生产测试模式

pnpm run dev:start

yarn

yarn run dev:start

npm

npm run dev:start

debug 模式

pnpm

pnpm run debug

yarn

yarn run debug

npm

npm run debug

打包

pnpm

pnpm run build

yarn

yarn run build

npm

npm run build

打包并预览

pnpm

pnpm run preview

yarn

yarn run preview

npm

npm run preview

使用手册

编写中

示例启用

About

基于koa2的nodejs后端模板

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published