Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Support build static files and serve CMS on CLI? #126

Description

@abz53378

Problem

We notice that lots of developers want to use canner script:serve(for development) to host their CMS. So we start think how if we provide other commands for developers to serve their CMS just writing the Canner schema.

Current Canner CLI

Canner CLI has two primary commands canner script:serve and canner script:deploy.

  • script:serve: Development. Use webpack-dev-server to build and serve the CMS at the same time, it only renders the basic navbar, sidebar, and the form of the CMS. It' s designed for developers to preview the UI of their own schemas and customized theme
  • script:deploy: Production. Use webpack to bundle the schemas, UI components(input, table, timepicker, ...etc.) and upload the canner.cloud.js to our platform. And then we will host the CMS on https://<cannerAppUrl>.cannercms.com
    including the events page (track the user action on CMS), login page, and lots of features.

Possible Solution

Maybe we can add two commands canner start and canner static:build.

  • static:build: Generate the static files such as HTML, CSS, js on the ${process.cwd()}/dist.
  • start: Serve the static files.

Discussion

How do you think? Any features, or something we should concern? @wwwy3y3 @chilijung @FrankYang0529 @FeklistovGleb @11111000000

Reference

#118
#111

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThis issue is still under discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions