這是一個 17 年末, 由於無聊作的一個 本身用的博客, 想經過一條龍的方式,學習前端,後端,和部署前端
最初部署在 阿里雲上的,一年後到期了,由於窮,我就改用 hexo
, 想看看個人新博客嗎 點這裏node
在這裏分享給你們, 固然,代碼寫的很糟糕,webpack
若是你想知道他是怎麼搭建的 請看 李金珂的小屋誕生記git
若是你喜歡的話, 就隨意折騰吧. 只需保留下圖的 註釋便可 : )github
GITHUBweb
炫酷的動畫 (當時本身想的創意)mongodb
文章頁數據庫
能夠直接上傳文章後端
關於頁瀏覽器
性感的播放器
就像上圖所示主要就 5 個功能
沒錯 年代後久遠, 技術棧的版本比較舊
React v16.X
ES6,ES7
webpack v3.0.0
Redux
React-Redux
React-Router v3.x
node.js
yarn
mongodb
mongoose
mocha
chai
less
socket.io
pwa
web push
v8.9+
安裝依賴
yarn
複製代碼
yarn start
複製代碼
yarn run build
複製代碼
yarn run dev-server
複製代碼
yarn run prod-server
複製代碼
yarn run connect-db
複製代碼
yarn run dump
複製代碼
yarn run restore
複製代碼
git clone https://github.com/lijinke666/lijinkeWeb.git
mongodb
, node.js
, nodemon
和 pm2
config/index.js
的 你本身的配置信息
cd lijinkeWeb
鏈接數據庫 yarn run connect-db
而後 拷貝數據庫 yarn run restore
yarn start
等待打包 自動打開瀏覽器 localhost:6688
yarn run dev-server
表格當時瞎設計的 就三張表格
const mongoose = require('mongoose') const debug = require('debug')('music-schema') const Schema = mongoose.Schema const musicSchema = new Schema({ name: String, //音樂名 src: String, //路徑 cover: String, //圖片路徑 desc:String , //描述 isShow: { type:Boolean, default:true } }, { collection: "music" }) const articleSchema = new Schema({ title: String, //文章標題 content: String, //文章內容 markdown 格式 previewContent:String, //預覽的文章內容 author: String, //做者 publishDate: { //發表日期 type:Date, default:Date.now }, pageView: Number, //點擊量 like: Number, //喜歡數量 approve:Boolean, //是否審覈經過 email:String, //做者郵箱 用來通知做者文章是否經過 category:Array, }, { collection: "article" }) const commentSchema = new Schema({ articleId:String, //文章id commentName:String, //姓名 commentEmail:String, //郵箱 commentContent:String, //內容 like:String, //點贊量 device:String, //設備 publishDate:{ //發佈日期 type:Date, default:Date.now } },{ collection:"comment" }) 複製代碼