Skip to content

自用前端脚手架模板,包含前后端一体模板和单后端模板等多分支

Notifications You must be signed in to change notification settings

SilverComet7/ChrisWang-cli-template

 
 

Repository files navigation

Introduction

本项目将nodejs后端和vue前端代码整合在一起,适用于同时需要前后端的小型项目。 本模板统一使用ts代码,前端使用vite2.x以快速开发,并搭配vue3+element-plus;后端使用koa2mongodb(配合mongoosetypegoose)。

Start

environment needed

  • TypeScript ^4.4
  • NodeJS ^12.22.0
  • Mongoose ~6.0.11
  • @typegoose/typegoose ^9.2.0
  • tsconfig.json 中启用 experimentalDecoratorsemitDecoratorMetadata
  • tsconfig.jsontarget 选项需要 es6 或以上

prepare

$ npm install
$ npx husky install
$ npm install -g commitizen # 可使用 git cz 提交代码

.env.example 复制一份环境变量至 .env ,建议将 DEBUG 设置为 true

安装 ESLintPrettier - Code formatter 插件。

run both server & client

npm run dev
# or
npm run debug

run server only

npm run dev:server
# or
npm run debug:server

run client only

npm run dev:client

build

npm run compile

build server only

npm run build:server

build client only

npm run build:client

About

自用前端脚手架模板,包含前后端一体模板和单后端模板等多分支

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 48.5%
  • JavaScript 24.2%
  • Vue 19.9%
  • SCSS 4.9%
  • HTML 1.3%
  • Shell 1.2%