Headless CMS primer
Learn how to build apps that serves CMS content through a powerful GraphQL API
>> Not in a rush? Visit our in-depth intro tutorial instead! >>
Open Terminal app and run the following command:
brew tap enonic/cli
brew install enonic
Not yet familiar with the MacOS package manager Homebrew?
Get it from https://brew.sh
...or manually download the CLI executable for MacOS
Open Powershell and run the following command:
scoop bucket add enonic https://github.com/enonic/cli-scoop
scoop install enonic
Not yet familiar with Scoop, the command line installer for Windows?
Get it from https://scoop.sh/
...or manually download the CLI executable for Windows
Open your Shell and run the following command:
wget -qO- https://repo.enonic.com/public/com/enonic/cli/installer/cli-linux/1.0.0/cli-linux-1.0.0.sh | sh
..optionally, use Snapcraft:
sudo snap install enonic
NOTE: Developers report build problems with the Snapcraft distro due to strict security policies, use the binary distro above if you experience such problems.
This command uses "headless movie database" as a template, leave out -r for more options.
enonic project create -r app-hmdb
...
cd myproject
enonic project deploy
Local dev environment is now available on http://localhost:8080
Tip: Go with the default options when prompted by CLI
NOTE: Sign up for free on Enonic Cloud and choose the 'CMS Essentials' template before running the commands below.
enonic cloud login
enonic cloud app install
Tip: Choose 'Production' if there are multiple install targets available
- In Cloud console: Your solution -> Production environment -> Log in
- After logging in: XP menu -> Content Studio -> Headless demo
Tip: See instructions to access the API, or go live - select the HMDB root item for more info
Congratulations on building and deploying your first app :-). Here are our recommended next steps:
Learn more about the app you just created...
Try our tutorial for building traditional sites
Complete our developer introduction guide
Get help and share your knowledge through our various community channels
The best place to get an answer: https://discuss.enonic.com
Stay up2date and chat with other XPeers: Join here
We're all about open source, get inolved on https://github.com/enonic
Using Enonic in mission critical deployments?
We make a living from professional training, cloud hosting, software support and specialist consulting.