Was this article helpful?
Thanks for your feedback
An environment refers to the content delivery destination where you publish and deploy the entries of your application or website.
Note: When working within branches, any environment created within a branch will be available across all the other branches of the stack. Refer to our Global Modules document for more information.
To add an environment, log in to your Contentstack account, and perform the following steps:
Tip: If you wish to preview your published content, you need to provide the address of your localhost as the base URL of the environment, i.e., http://localhost:4000. Now, after publishing your content, point your browser to 'http://localhost:4000/{relative-url-of-the-published-entry}' in order to view the published content on your browser. Alternatively, you can click on the "eye" icon in the URL field of your entry page to get the URL.
In case of mobile apps or other devices, you need not enter the base URL. This is because apps fetch content directly from Contentstack servers through APIs.
Subsequently, whenever an incoming page request is received, the content will be retrieved and rendered directly from the local server, instead of fetching it from the Contentstack database via APIs. This process is also known as “push publishing.”
It is recommended that you select this option only if you are using our web framework (contentstack-express) for your websites.
Warning: contentstack-express framework has been deprecated. We will soon stop supporting this framework. Instead, we recommend using DataSync, which is faster and more flexible than the web framework.
For apps, unlike web pages, the content is not pushed to any external servers. Instead, the app fetches content directly using Content Delivery API. Therefore, there is no need to deploy content to servers. In this case, disabling the Deploy Content to Server(s) option will let you publish the entry over an environment without deploying the content on the server.
In this short video, we will create a development environment with base URL as http://localhost:4000.
Hover on the Preview (eyeball) icon beside the URL field to view the URLs of all the environments in which the entry has been published. Click any of the links to visit the web page and view the entry.
To perform the add action via API request, refer to the Add an environment API request
Was this article helpful?
Thanks for your feedback