Skip to content

iOSDevClub/mobius-cms

 
 

Repository files navigation

MOBIUS CMS

framework and library used

plugin base

  • support plugin install without restart server
  • front end use react and browserify bondle to front page
  • dynamic setup orm model
  • dynamic setup plugin backend rest action
  • dynamic front end and backend routing

Install and Run

  • npm install
  • bower install
  • gulp
  • coffee server/server.coffee

after install, we can access web site by:

http://localhost:3000/ui

the initial page like above picture:

enter image description here

Install plugin in runtime

install plugin cms-plugin-sample, that is a todo list.

we can install by below rest api:

http://localhost:3000/api/Plugins/install?url=git@github.com:smlsunxie/cms-plugin-sample.git&name=cms-plugin-sample

sample result like:

{
  result: {
    success: true,
    plugin: {
      name: "cms-plugin-sample",
      url: "git@github.com:smlsunxie/cms-plugin-sample.git",
      id: 1
    }
  }
}

then reload again http://localhost:3000/ui

the preview page above :

enter image description here

you can check plugin info by visit: http://localhost:3000/api/Plugins/info?id=1

sample result:

{
  "result": {
    "plugin": {
      "name": "cms-plugin-sample",
      "url": "git@github.com:smlsunxie\/cms-plugin-sample.git",
      "id": 1
    },
    "models": [
      {
        "name": "ModuleTodo",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "id": 1,
            "generated": true
          }
        }
      }
    ],
    "actions": [
      {
        "name": "testAction"
      },
      {
        "name": "get"
      },
      {
        "name": "post"
      }
    ]
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published