巩固知识、打发时间
This project is developed based on these two points, and there may be flaws in the details.
The front-end code is: ./front-end The interface code is: ./server The background management code is: ./admin
The blog theme style is based on YEVPT ps: 嘤嘤嘤, not as good-looking as him
https
RESETful api
standardization Server configuration (server directory) The project currently supports two configuration methods: file
and nacos
, which can be distinguished by environment variables ( CONFIG_MODE
).
CONFIG_MODE=file | nacos # 二选一
app.config.[production|development].json
and app.config.json
. NACOS_SERVER_ADDR=localhost:8848 # 地址
NACOS_NAMESPACE=dev # 命名空间
NACOS_DATA_ID=blog # 数据ID
NACOS_GROUP=DEFAULT_GROUP # 组ID
NACOS_USERNAME=dev_test # 用户名
NACOS_PASSWORD=111111 # 密码
They were all written when I was in school.
The first version was written by java servlet and is no longer maintained. 1.0
The second version is koa+mongo+ejs+bootstrap+jquery+layui. It is currently closed and the article data has been migrated [githubh2.0] [online address].
The blog feels a bit like building a technology stack just for the sake of building a technology stack. I said that it has been confirmed! ! !
I originally planned to masturbate directly to the 3n frame, but I was still too lazy. .
Generally: nest/nuxt/vue
UI: ElementUI/Vuetify
Data storage: mongo/redis/cookie/localStoreage
Notification: Tencent sms/email
Some configuration files were not uploaded to github, and will be simplified and uploaded later [GitHub] [Online address]
Containerized deployment using Docker
tar --exclude=node_modules --exclude=dist --exclude=.nuxt --exclude=_config --exclude=.DS_Store --exclude=.git -zcvf ../blog3.tar.gz .
docker-compose up --build
docker-compose up -d
Using
Nuxtjs
+Vuetify.js
Use
nestjs
+mongodb
+redis
+cos
Using
Vuejs
+Element UI
├── README.md # 自述
├── admin # 管理页面
│ ├── Dockerfile # 管理页面 Dockerfile 配置 (ps: 目前无用)
│ ├── README.md # 管理页面自述
│ ├── package.json
│ ├── public
│ ├── src # 项目目录
│ └── vue.config.js # vue 配置文件
├── docker-compose.yml # docker-compose 配置文件
├── front-end # 博客前台页面
│ ├── Dockerfile
│ ├── README.md
│ ├── assets
│ ├── components
│ ├── constant
│ ├── jsconfig.json
│ ├── layouts
│ ├── middleware
│ ├── nuxt.config.js
│ ├── package-lock.json
│ ├── package.json
│ ├── pages
│ ├── plugins
│ ├── server
│ ├── static
│ ├── store
│ └── utils
├── package.json
└── server # 博客服务端
├── Dockerfile
├── README.md
├── dist
├── nest-cli.json
├── package-lock.json
├── package.json
├── src
├── test
├── tsconfig.build.json
├── tsconfig.json
├── tslint.json
├── views
└── yarn.lock
2020-06-22 Basic version project deployment
2020-07-02 The interactive function is basically complete
clone this project
Change server/src/ _config
to server/src/ config
Modify the configuration in the server/src/config/default.conf.ts
file
Install dependencies in each project
Run the server
cd server
&&npm run start:dev
cd front-end
&&npm run dev
cd admin
&&npm run serve