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

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

Open
abz53378 opened this issue Nov 15, 2018 · 3 comments
Open

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

abz53378 opened this issue Nov 15, 2018 · 3 comments
Labels
discussion This issue is still under discussion

Comments

@abz53378
Copy link
Contributor

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

@abz53378 abz53378 added the discussion This issue is still under discussion label Nov 15, 2018
@chilijung
Copy link
Contributor

chilijung commented Nov 15, 2018

This is a really nice feature! But does this mean that login page is not included in the build?

I think we can hosting version of CMS without login page with the build, which you proposed. Looks good to me.

@11111000000
Copy link

authorization is a middleware. Cloud storage - is an option (good option). That sort of cms (canner script) - - good with it's agile nature, integration.

@chilijung
Copy link
Contributor

@FeklistovGleb @11111000000 since your CLI must rely on Canner platform API server (which is why you need to canner script:deploy to deploy your credentials to Canner). Building static files and serve it would not create API server in your local machine, it's only a static hosting server.

Does this make sense to you guys?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion This issue is still under discussion
Projects
None yet
Development

No branches or pull requests

3 participants