Node.js Developer Guide
Other documentationsDemoCommunityGitHub
  • Forest Admin
  • Getting started
    • How it works
    • Quick start
    • Install
      • Create your agent
      • Expose an HTTP endpoint
        • For standalone agents
        • On Express
        • On Koa
        • On Fastify
        • On NestJS
      • Autocompletion & Typings
      • Troubleshooting
    • Migrating legacy agents
      • What's new
      • Pre-requisites
      • Recommendations
      • Migration steps
        • Run new agent in parallel
        • Configure database connection
        • Code transformations
          • API Charts
          • Live Queries
          • Smart Charts
          • Route overrides
          • Smart Actions
          • Smart Fields
          • Smart Relationships
          • Smart Segments
        • Compare schemas
        • Swap agents
      • Post-migration
        • Dropping Sequelize
        • Optimize your agent
  • Data Sources
    • Getting Started
      • Collection selection
      • Naming conflicts
      • Cross-data source relationships
      • Query interface and Native Queries
        • Fields and projections
        • Filters
        • Aggregations
    • Provided data sources
      • SQL (without ORM)
      • Sequelize
      • Mongoose
      • MongoDB
    • Write your own
      • Replication strategy
        • Persistent cache
        • Updating the replica
          • Scheduled rebuilds
          • Change polling
          • Push & Webhooks
        • Schema & References
        • Write handlers
      • Translation strategy
        • Structure declaration
        • Capabilities declaration
        • Read implementation
        • Write implementation
        • Intra-data source Relationships
      • Contribute
  • Agent customization
    • Getting Started
    • Actions
      • Scope and context
      • Result builder
      • Static Forms
      • Widgets in Forms
      • Dynamic Forms
      • Form layout customization
      • Related data invalidation
    • Charts
      • Value
      • Objective
      • Percentage
      • Distribution
      • Leaderboard
      • Time-based
    • Fields
      • Add fields
      • Move, rename and remove fields
      • Override binary field mode
      • Override writing behavior
      • Override filtering behavior
      • Override sorting behavior
      • Validation
    • Hooks
      • Collection hook
      • Collection override
    • Pagination
    • Plugins
      • Provided plugins
        • AWS S3
        • Advanced Export
        • Flattener
      • Write your own
    • Relationships
      • To a single record
      • To multiple records
      • Computed foreign keys
      • Under the hood
    • Search
    • Segments
  • Frontend customization
    • Smart Charts
      • Create a table chart
      • Create a bar chart
      • Create a cohort chart
      • Create a density map
    • Smart Views
      • Create a Map view
      • Create a Calendar view
      • Create a Shipping view
      • Create a Gallery view
      • Create a custom tinder-like validation view
      • Create a custom moderation view
  • Deploying to production
    • Environments
      • Deploy on AWS
      • Deploy on Heroku
      • Deploy on GCP
      • Deploy on Ubuntu
      • Deploy on Azure
    • Development workflow
    • Using branches
    • Deploying your changes
    • Forest Admin CLI commands
      • init
      • login
      • branch
      • switch
      • set-origin
      • push
      • environments:create
      • environments:reset
      • deploy
  • Under the hood
    • .forestadmin-schema.json
    • Data Model
      • Typing
      • Relationships
    • Security & Privacy
Powered by GitBook
On this page

Was this helpful?

  1. Deploying to production
  2. Forest Admin CLI commands

environments:create

This is the official documentation of the @forestadmin/agent Node.js agent.

Creating a test environment

You might consider having Test Environments created (automatically in CI/CD or manually) for a short period of time to help your team on testing your new admin panel evolutions.

Remote Environments can be used for testing as-well, but in this kind of environment you will have to handle roles and permissions to give access to a newly created Smart Action or a new Collection. This can lead to frustration as it can break your continuous delivery process because as a developer, you might not have access to the roles settings of your project. This would require you, for every of the environment created, to ask for an admin to set the roles and permissions up.

Test Environments have been designed to tackle this topic. They basically are Remote Environments, but without the roles and permissions system.

These Environments can be accessed by developers, admins and editors from the environments' dropdown. Users can have access as-well, but the environment will not be proposed in their dropdown for convenience. So you will need to share the entire layout url to them.

This kind of Environment should be created by using the Forest Admin CLI. You’ll have to use the --disabledRoles option with the environments:create command in order to disable the roles of the new Environment.

Here is an example:

forest environments:create --name 'pr-1930' -u 'https://pr-1930.company.com' --disableRoles

And that is it! Make sure your test server is up and running started and reach your admin panel to observe that a new Environment appeared with everything (data, actions,...) accessible by default.

As any user invited to join this Test Environment will have full permission to read and write on the targeted data sources, be sure that the data sources content is not sensitive and can be read, updated, deleted without any data security concerns.

PreviouspushNextenvironments:reset

Last updated 1 year ago

Was this helpful?