How to: Create Your First Configuration With Nedoto

In this article, we’ll guide you through creating your first configuration using Nedoto, a powerful tool for managing remote configurations in your software projects.

Create Your Project

To begin, the first step is to create a project where you can organize and store your configurations efficiently.

blank
  1. Naming Your Project: Choose a meaningful name that reflects your application, website, or project. This name helps in easily identifying your project later on.
  2. Project Description: It’s beneficial to write a brief description. As your list of projects grows, descriptions serve as useful reminders.
  3. Assign a Color: Assigning a color to your project aids in quick visual identification, especially when managing multiple environments and configurations.
  4. Enable API Access: Ensure your project is enabled for API access.

Create Your Environment

In software development, having distinct environments like development, staging, and production is essential for testing and deploying new features.

blank
  1. Select Project: Choose the project where you want to add a new environment from the dropdown menu.
  2. Fill Required Fields: Provide necessary details for the new environment setup.
  3. Add Description: Optionally, include a short description to clarify the environment’s purpose.
  4. Enable API Access: Check the box to enable API access for the environment.

Create the Configuration

Nedoto supports various types of configurations based on your application’s needs:

  • string
  • integer
  • float
  • boolean
  • code
  • json
  • html

For our example, we’ll use a JSON configuration to demonstrate how our application can dynamically react to different settings.

blank
  1. Configuration Setup: Define your configuration type and parameters.
  2. Enable API Access: Ensure the configuration is enabled for API access.

As you can see in the JSON defined above we are defining a JSON to be retrieved where we are:

  • enabling the wishlist
  • setting the requests per minute to 50
  • enabling the “my new cool feature”
  • disabling the “my old new feature”
  • and setting a background image for our header using the Nedoto CDN

Retrieve the Configuration

After setting up your project, environment, and configuration, you can easily retrieve the configuration via the Nedoto API.

  1. API Call: Retrieve your configuration using a standard HTTP GET API call. You can use tools like curl or integrate directly with Nedoto’s TypeScript SDK or Laravel package.
  2. Required Information: To retrieve your configuration, you’ll need:
    • a valid api key
    • Configuration slug
  3. Access Information: Find these details in your configuration settings for easy access.

To retrieve these information, you have to edit your previously defined configuration and scroll to the bottom. In this section, you’ll find all the required information.

blank

As you can see in the image above you can find the api key and another section called “Test it!” with a pre-compiled curl command.

Just run that command in your shell and you’ll get the configuration:

blank

The response will always be the same so you don’t have to worry about it and if you define the JSON configuration, your son string will be automatically converted in a JSON object as shown in the image above.

Conclusion

In this tutorial, we’ve covered the essential steps to configure your project, set up environments, define configurations, and retrieve them using Nedoto’s API. Understanding these steps will enhance your software development lifecycle by efficiently managing remote configurations.

Stay tuned for our next article, where we’ll explore real-time configuration updates with Nedoto.