refactor: tools 栏目扁平化,去除子文件夹
- 文档全部移至 tools/ 根目录(docker_install、vscode_exception 等带前缀命名) - 图片按板块前缀重命名(docker-1.png、prisma-verify1.png 等)避免名称冲突 - 更新文档内图片引用与 sidebar_position 排序 - 更新 tools/index.md 目录链接 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
b487f44cd7
commit
6ddf800f87
33 files changed
+35
-85
No files matched your search
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "工具使用",
|
||||
"position": 4,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "Docker",
|
||||
"position": 4,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# docker的安装与验证
|
||||
@@ -16,9 +16,9 @@ docker是一种开源平台,用于开发、部署和运行应用程序。
|
||||
### 1. 开启windows功能
|
||||
通过控制面板,开启Hyper-v和适用于windows子系统功能
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### 2. 下载并安装docker
|
||||
下载docker最安全的路径就是去官网,安装时要注意勾选`wsl`选项,安装成功后跳过登录docker Hub账号
|
||||
@@ -29,9 +29,9 @@ https://docs.docker.com/desktop/install/windows-install/
|
||||
## 配置Docker镜像
|
||||
安装docker后,进入docker,开始配置镜像
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
配置镜像添加以下内容
|
||||
```
|
||||
@@ -44,5 +44,5 @@ https://docs.docker.com/desktop/install/windows-install/
|
||||
docker run hello-world
|
||||
```
|
||||
当输出`Hello from Docker`命令时,表明Docker安装正确
|
||||

|
||||

|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Docker启动数据库
|
||||
@@ -54,7 +54,7 @@ docker-compose up --build
|
||||
```
|
||||
docker ps
|
||||
```
|
||||

|
||||

|
||||
|
||||
### 5. 连接到PostgreSQL数据库
|
||||
运行以下命令,连接到PostgreSQL数据库:
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
@@ -40,7 +40,7 @@ git 是一个代码管理工具,可以追踪代码的提交记录。这是每
|
||||
通常一个项目会对应一个 git 仓库,每次提交代码都会记录到 git 仓库中,这样就可以追踪代码的提交记录。
|
||||
|
||||
用图形化的工具来看的话,会呈现出如下图
|
||||

|
||||

|
||||
|
||||
### 克隆
|
||||
|
||||
@@ -58,7 +58,7 @@ git clone https://github.com/idealjs/stack.git
|
||||
|
||||
被克隆的仓库,我们通常叫他 **远程仓库**。或者源仓库。
|
||||
|
||||

|
||||

|
||||
|
||||
### 拉取代码
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "Git",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,12 @@ sidebar_position: 1
|
||||
|
||||
## 内容
|
||||
|
||||
1. [安装工具(nodejs、vscode)](./install/nodejs.md)
|
||||
2. [Git](./git/index.mdx)
|
||||
3. [NVM](./nvm/install_nvm.md)
|
||||
4. [Docker](./docker/install.md)
|
||||
5. [Prisma](./prisma/prisma.md)
|
||||
6. [VSCode 常见问题](./vscode/exception)
|
||||
7. [Linux Alias](./linux/alias.md)
|
||||
1. [安装 nodejs](./nodejs)
|
||||
2. [安装 vscode](./vscode)
|
||||
3. [Git](./git)
|
||||
4. [NVM](./nvm)
|
||||
5. [Docker 安装](./docker_install)
|
||||
6. [Docker 启动数据库](./docker_start)
|
||||
7. [Prisma](./prisma)
|
||||
8. [VSCode 常见问题](./vscode_exception)
|
||||
9. [Linux Alias](./linux_alias)
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "安装工具-win",
|
||||
"position": 1,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "Linux",
|
||||
"position": 7,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Linux alias
|
||||
File renamed without changes.
@@ -1,3 +1,7 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# nvm
|
||||
- Node.js是用于服务器端JavaScript运行,适合高性能、实时应用
|
||||
- NVM用于管理多个Node.js版本,便于在不同项目间切换
|
||||
File renamed without changes.
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "NVM",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
+4
-4
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Next.js + Prisma + Docker构建全栈
|
||||
@@ -13,7 +13,7 @@ sidebar_position: 1
|
||||
5. 确认已启动数据库
|
||||
|
||||
>**提示**
|
||||
如果不知道怎么启动数据库,可以参考使用 [Docker启动数据库](/tools/docker/start)文档
|
||||
如果不知道怎么启动数据库,可以参考使用 [Docker启动数据库](/tools/docker_start)文档
|
||||
|
||||
## 项目初始化
|
||||
- 打开Next.js项目
|
||||
@@ -62,8 +62,8 @@ npx prisma studio
|
||||
#### 4.2 验证数据
|
||||
在`Prisma Studio`中,可以查看`User`表的数据,通过添加、编辑或修改记录,验证表是否正确
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### 5. 在Next.js中使用Prisma
|
||||
#### 5.1 设置Prisma客户端
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "Prisma",
|
||||
"position": 5,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# 安装 vscode 编辑器
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"label": "VSCode",
|
||||
"position": 6,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# 如何处理vscode安装插件异常
|
||||
@@ -12,17 +12,17 @@ https://marketplace.visualstudio.com
|
||||
```
|
||||
如果一切正常,您应该在`https://marketplace.visualstudio.com`有一个Extensions for Visual Studio Code的页面。
|
||||
|
||||

|
||||

|
||||
|
||||
## 2. 防火墙阻止
|
||||
当我们第一次启动调试功能的时候,正常情况vscode会弹出防火墙阻止的界面
|
||||
|
||||

|
||||

|
||||
|
||||
## 3. 设置代理
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
在`setting.json`中添加以下代理
|
||||
```
|
||||
Reference in new issue
Block a user