DEV Community

Cover image for swapp - A CLI for managing App Settings in Azure Static Web Apps
Burke Holland for Microsoft Azure

Posted on • Originally published at burkeholland.github.io on

6 2

swapp - A CLI for managing App Settings in Azure Static Web Apps

“swapp” is a command line utility (CLI) for managing Application Settings in Azure Static Web Apps.

Application settings are settings that are stored in Azure and can be consumed by Static Web App API’s via the process.env variable. This is ideal for sensitive information like database connection strings, application keys, ect. Currently, these application settings have to be managed from the Azure Portal or with a rather cryptic Azure CLI REST command. Swapp abstracts this REST command into a simple command line interface.

Swapp only does two things - upload your application settings and list your application settings.

Batch upload of app settings

Swapp assumes that you have a local.settings.json file in the directory where you run the “swapp” command. To upload all of your application settings in one go, run npx swapp upload from the same directory where your local.settings.json file is. You will need to select your subscription, enter your resource group and application name. Then swapp will do it’s thing…

Listing app settings

Sometimes you just wanna know what app settings your app currently has in Azure. Perhaps you just want to check and make sure the app settings you just uploaded are actually there. To do that, run npx swapp list. This command can be run from any directory.

For more information on app settings in Azure Static Web Apps, see this article. Also, the VS Code extension for Static Web Apps will upload your app setttings automatically as well.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (2)

Collapse
 
jornh profile image
jornh • Edited

FYI: Videos above here on DEV.to (on an iPad) gives me a:

null
If the owner of this video has granted you access, please sign in.

Luckily they work on your original site

edit: I see it’s updated and working now, great thanks!

Collapse
 
burkeholland profile image
Burke Holland

Yep - sorry about that! Apparently I'm still learning how to "YouTube".

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay