zhuoqinyue/full_stack_course

A tiny Full Stack project

★ 0Forks 0JavaScriptGitHub ↗Compare

README

课程

这是一个前后端全栈的课程, 对于如何理解前后端各自工作, 各自合作运行有很好的帮助

设置

git 单独配置

设置单独的 git 配置

git config user.name "私人的邮箱"
git config user.email "私人的用户名"

## 查看该仓库的配置
git config --list

进入 .git 目录配置要上传的路径(有令牌)

[remote "origin"]
    url = https://[email protected]/yourusername/test-repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*

根目录是 git 仓库根目录, 它会搜索各个子目录下的 .gitignore 文件进行忽略

设置 npm 源

## 获取 npm 镜像
npm config get registry

## 设置为 taobao 镜像
npm config set registry https://registry.npmmirror.com'

该项目使用的 npm 版本为 22.3.0, 自己使用 nvm 管理

运行项目

该项目有前后端项目, 使用的时候需要同时启动

  • ex_ba 代表后端项目
  • ex_fr 代表前端项目

后端项目

后端项目使用 Express + Mangodb

也集成一些好用的依赖

  • mongoose 操作 mangodb 数据库
  • jsonwebtoken 生成 jwt token
  • bcrypt 生成哈希值
  • morgan 记录请求日志
## 运行
npm run dev

## 检查格式化
npm run lint

## 格式化
npm run fix

前端项目

前端项目使用 Vite + React + React Router + Shadcn UI

## 运行
npm run dev

Contributors

zhuoqinyue

Issues