Giter Club home page Giter Club logo

mrxujiang / simplecms Goto Github PK

View Code? Open in Web Editor NEW
80.0 4.0 24.0 28.88 MB

simpleCMS是一款开源cms系统, 主要为个人/团队快速开发博客或者知识共享平台, 类似于hexo, worldpress, 但是他们往往需要复杂的搭建过程, 我们将复杂度降到最低, 并且有详细的部署教程, 你只需要有一台服务器, 就能轻松拥有一个属于你的博客平台.

Home Page: http://cms.zhikume.cn

License: MIT License

TypeScript 39.49% Less 4.99% JavaScript 25.07% Pug 7.45% CSS 16.04% Shell 0.02% HTML 6.93%
cms cms-framework website wordpress blog blog-engine nodejs frontend cms-backend cms-extension

simplecms's Introduction

cms, 网站博客系统, blog, forntend, nodejs, javascript

SimpleCMS 👋

issues forks starts license

simpleCMS 是一款开源 cms 系统, 主要为个人/团队快速开发博客或者知识共享平台, 类似于 hexo, worldpress, 但是他们往往需要复杂的搭建过程, 我们将复杂度降到最低, 并且有详细的部署教程, 你只需要有一台服务器, 就能轻松拥有一个属于你的博客平台。

simpleCMS is an open source cms system, mainly for individuals/teams to quickly develop blogs or knowledge sharing platforms, similar to hexo, worldpress, but they often require complex build processes, we minimize complexity, and have detailed deployment tutorials, you only need a server, you can easily have a blog platform that belongs to you.

Demo

simpleCMS

启动教程

  1. 安装依赖 分别进入 servermanage 目录,执行:
# cd manage
yarn
# cd server
yarn
  1. 本地启动

管理端启动:

# cd manage
yarn start

服务端启动:

# cd server
yarn start

为了让管理端能跨域调用server端接口, 需要在server/src/index.js 中配置跨域白名单:

// 设置跨域
  app.use(
    cors({
      origin: function (ctx) {
        const whiteList = [
          "http://192.168.1.10:8000", // 你的管理后台ip地址,为了支持跨域调用
        ]; //可跨域白名单
        if (
          whiteList.includes(ctx.request.header.origin) &&
          ctx.url.indexOf(config.API_VERSION_PATH) > -1
        ) {
          return ctx.request.header.origin; //注意,这里域名末尾不能带/,否则不成功,所以在之前我把/通过substr干掉了,允许来自指定域名请求, 如果设置为*,前端将获取不到错误的响应头
        }
        return "";
      },
      exposeHeaders: ["WWW-Authenticate", "Server-Authorization", "x-show-msg"],
      maxAge: 5, //  该字段可选,用来指定本次预检请求的有效期,单位为秒
      credentials: true,
      allowMethods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
      allowHeaders: [
        "Content-Type",
        "Authorization",
        "Accept",
        "X-Requested-With",
      ],
    })
  );

同时在manage/src/utils/index.ts中配置服务端ip,

export const SERVER_URL = 'http://192.168.1.10:3000'

部署教程

  1. 静态资源打包

在manage项目中执行:

yarn build

后会自动把项目打包到server/static目录下,此时在server项目中执行:

yarn build

会把服务端代码打包,此时本地运行:

node dist/index.js

即可启动CMS项目。

  1. 服务端部署

服务端部署可以用pm2做node应用的管理器,具体使用可以参考pm2官网。

技术反馈和交流群 | Technical feedback and communication

技术反馈和交流群

simplecms's People

Contributors

aleryxu avatar cw514102209 avatar huguojiang avatar mrxujiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simplecms's Issues

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.