Code Monkey home page Code Monkey logo

tetu35 / static-web-apps-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/static-web-apps-cli

0.0 0.0 0.0 14.38 MB

Azure Static Web Apps CLI ✨

Home Page: https://aka.ms/swa/cli-local-development

License: MIT License

Shell 1.54% JavaScript 28.98% Ruby 0.88% C++ 1.30% Python 0.46% C 0.06% Objective-C 0.01% CoffeeScript 0.26% C# 0.80% Kotlin 0.01% Dart 0.43% TypeScript 45.40% CSS 6.67% Elm 0.06% Swift 0.03% Makefile 0.19% HTML 8.97% Handlebars 1.30% CMake 0.62% Vue 2.04%

static-web-apps-cli's Introduction

Azure Static Web Apps CLI

logo

The Static Web Apps CLI, also known as SWA CLI, serves as a local development tool for Azure Static Web Apps. It can:

  • Serve static app assets, or proxy to your app dev server
  • Serve API requests, or proxy to APIs running in Azure Functions Core Tools
  • Emulate authentication and authorization
  • Emulate Static Web Apps configuration, including routing and ACL roles
  • Deploy your app to Azure Static Web Apps

Important Notes

If you have suggestions or you encounter issues, please report them or help us fix them. Your contributions are very much appreciated. 🙏

The CLI emulates commonly used capabilities of the Azure Static Web Apps cloud service. Some differences are expected. Always deploy and test your apps in Azure to confirm behavior.

Quickstart

Installing the CLI with npm, yarn or pnpm:

  • To install the CLI globally, use:

    npm install -g @azure/static-web-apps-cli

    You can also install the SWA CLI inside a project (instead of globally) as a development dependency using npm install -D @azure/static-web-apps-cli. This is highly recommended.

Basic usage

  • Open a SWA app folder at the root (outside any /api or /app folders):

    cd my-awesome-swa-app
  • The best way to get started is to run the swa command alone and follow the interactive prompts:

    swa

It will generate a configuration for you, then build your project and ask if you want to deploy it to Azure.

See swa for more details.

Extended usage

Here are the currently supported swa commands. Use swa <command> --help to learn about options and usage for that particular command.

  • login: login into Azure
  • init: initialize a new static web app project
  • start: start the emulator from a directory or bind to a dev server
  • deploy: deploy the current project to Azure Static Web Apps
  • build: build your project

Using npx:

  • Open a SWA app folder at the root (outside any /api or /app folders):
cd my-awesome-swa-app
  • Create a configuration for your project:
npx @azure/static-web-apps-cli init
  • Start the emulator:
npx @azure/static-web-apps-cli start
  • Access your SWA app from http://localhost:4280

See all available commands and options.

Want to help?

Want to file a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the list: community-help.

static-web-apps-cli's People

Contributors

aaronpowell avatar alexweininger avatar allcontributors[bot] avatar anfibiacreativa avatar anthonychu avatar ci-rebot avatar cjk7989 avatar danwatford avatar dependabot[bot] avatar devansu-yadav avatar georgeosddev avatar horihiro avatar manekinekko avatar mathiasi avatar reshmi-sriram avatar rupareddy5-21 avatar santoshyadavdev avatar sgollapudi77 avatar shmool avatar sikebe avatar sinedied avatar snyk-bot avatar stuartleeks avatar sulabh-msft avatar thomasgauvin avatar thsackos avatar timdeschryver avatar tush avatar vivekjilla avatar yamachu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.