GithubHelp home page GithubHelp logo

isabella232 / reactjs-webapp-functions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/reactjs-webapp-functions

0.0 0.0 0.0 2.63 MB

Dockerfile 5.85% Shell 25.30% Makefile 2.90% Bicep 27.29% TypeScript 3.87% HTML 2.96% JavaScript 29.37% Pug 0.13% CSS 2.33%

reactjs-webapp-functions's Introduction

Welcome to the React.js and serverless accelerator

Archictecture Overview

This accelerator implements a node.js (Express) webapp with a React.js frontend, hosted as an Azure Web app backed by a PostgreSQL database. Events from the React.js site will invoke background functions implemented as Azure Functions and invoke a webhook in Teams.

NOTE: Check below for required secrets and changes to get started

To get started, simply open the repository in Codespaces and start debugging. This is possible because the accelerator has a development environment defined in a container (a .devcontainer). There are database migration and seed data processes configured to run when your devcontainer starts, so expect some data to show up.

The webapp has a single model and route implemented. You can simply go ahead and add your business model and logic to the app.

Most of the routines you would want to run when developing are implemeted as make targets, so simply invoke 'make build' to build the application, or use VS Code tasks to run 'make test' - and checkout the testing framework implemented.

On checkins, the app builds and a Porter bundle is being created and pushed to a registry (To be implemented in #11).

In order to deploy the application and all the required resources, checkin a change to an environment file (To be implemented #11). The environment file also includes all the parameters used for that deployment.

Required to get started

  1. Setup an ARC-enabled Kubernetes cluster, by following these instructions. The src/arc/lima-setup.sh script can help, but check the setup instructions in the above link, as these change frequently.

  2. Enable CNAB bundle support in GitHub

    1. Follow this guide to enable support for CNAB on GitHub
  3. Set following deployment time parameters as GitHub secrets

    Parameter GitHub Secret Description
    Teams Webhook TEAMS_WEBHOOK_URL Create a Team Channel and add an Incoming Webhook connector.
    Package admin PACKAGE_ADMIN Create a personal access token with 'write:packages' permissions and save the value to this secret
    Azure credentials AZURE_CREDENTIALS az login -o none && az ad sp create-for-rbac --role contributor --sdk-auth
    Postgres admin password POSTGRES_DB_ADMIN_PASSWORD Configure what postgres database admin password you want to use - more info by saving the password to a GitHub Secrets name
  4. Check the environment.yaml file. For ARC deployments, ensure to include the correct App Service Environment to use. The syntax is commented in the file.

  5. Run the build workflow, this will eventually kick-off the deployment workflow as well.

reactjs-webapp-functions's People

Contributors

jeffhollan 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.