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
Labels
discussion
This issue is still under discussion
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
andcanner script:deploy
.script:serve
: Development. Usewebpack-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 themescript:deploy
: Production. Usewebpack
to bundle the schemas, UI components(input, table, timepicker, ...etc.) and upload thecanner.cloud.js
to our platform. And then we will host the CMS onhttps://<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
andcanner static:build
.static:build
: Generate the static files such asHTML
,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
The text was updated successfully, but these errors were encountered: