Skip to content

smlsunxie/loopback-tdd-sample

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

run on docker

if your computer without nodejs environment, this project can run on docker, just install docker and fig, then run below command:

fig up mobius

take a while, it well ready for use.

if you run on docker, your host is localdocker or find your own docker host by boot2docker ip.

then the url will be http://localdocker:3000/ui

plugin install without restart

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

Releases

No releases published

Packages

No packages published