Code Monkey home page Code Monkey logo

nuxtblog's Introduction

Build Status License

VueBlog

English Doc

VueBlog是一个轻量级的博客应用

技术栈

  • 前端:Nuxt.js + Vuex
  • 后端: Mongoose + Koa

功能特性

  • 支持服务端渲染
  • PWA渐进式web应用
  • 轻量级Markdown编辑器
  • 支持标签、归档、搜索草稿箱等功能

本地运行

安装MongoDB数据库和Node.js环境。

# install dependencies
npm install # or yarn

# serve in dev mode, with hot reload at http://127.0.0.1:3000
npm run dev

# build for production
npm run build

# serve in production mode
npm start

注意: 不要使用http://localhost:3000访问,而是用http://127.0.0.1:3000

全局配置

全局配置文件/server/config/index.js

默认用户名:q,默认密码:q

export default {
  // 初始化管理员信息,后台可以修改
  user: {
    role: 'superAdmin',
    username: 'q',
    password: 'q',
    email: '[email protected]',
    nickname: 'VueBlog',
    motto: 'Never too old to learn',
    avatar: 'avatar.png'
  },
  jwt: {
    secret: 'vueblog'
  },
  // 数据库配置,默认即可
  mongodb: {
    host: '127.0.0.1',
    database: 'vueblog',
    port: 27017,
    username: '',
    password: ''
  },
  // 可选,评论功能需要配置github登录的密钥
  githubConfig: {
    githubClient: '',
    githubSecret: '',
    scope: 'user'
  },
  // 可选,评论通知的SMTP邮箱配置,目前只支持qq邮箱
  emailConfig: {
    user: '',
    pass: ''
  },
  app: {
    domain: '', // 可选,线上域名,比如https://www.86886.wang
    host: '127.0.0.1',
    port: 3000,
    routerBaseApi: 'api'
  }
}

线上部署

如果需要部署到线上看下效果,可以参考这里Nuxt项目自动化部署手册

如果感觉自动化部署太麻烦,可以简单部署上线

# install dependencies
npm install # or yarn

# build for production
npm run build

# serve in production mode
pm2 start npm --name "vueblog" -- start

开源协议

GPL-3.0

nuxtblog's People

Contributors

sinchang avatar wmui avatar yinfo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.