Giter Site home page Giter Site logo

apollo-typescript-azure-template's Introduction

Apollo + TypeScript + Azure

Deploy locally

yarn start

Deploy to Azure

(see https://www.apollographql.com/docs/apollo-server/deployment/azure-functions/)

Create resource group
az group create --name apollo-ts-azure --location germanywestcentral
Create storage account
az storage account create \
    --name apollotsazure \
    --location germanywestcentral \
    --resource-group apollo-ts-azure \
    --sku Standard_LRS
Create function app
az functionapp create \
    --resource-group apollo-ts-azure \
    --name apollo-ts-azure \
    --consumption-plan-location germanywestcentral \
    --runtime node \
    --functions-version 3 \
    --storage-account apollotsazure
Publish
func azure functionapp publish apollo-ts-azure

If function app has changed - check package.json:deploy script. Then yarn cmd can be used for publishing

yarn deploy

NOTE

When GraphQL Playground starts, It won't have the correct URL containing the security code, and a message "Server cannot be reached" as shown at your browser.

We just need to put the full URL that includes the security code in the Playground url box. The background polling should refresh the screen momentarily. Click the Schema button to see if the docs are loaded correctly as the image below.

Cleanup

az functionapp delete \
    --resource-group apollo-ts-azure \
    --name apollo-ts-azure

az storage account delete \
    --name apollotsazure \
    --resource-group apollo-ts-azure \
    --yes

az group delete \
    --name apollo-ts-azure \
    --yes

Serverless

Install serverless cli

npm install -g serverless

To login to Azure (https://github.com/serverless/serverless-azure-functions#advanced-authentication)

Deploy locally

sls offline

Deploy

sls deploy

Cleanup

sls remove

Apollo Studio

To configure Apollo Studio - check examples/apollo-studio

apollo-typescript-azure-template's People

Contributors

dependabot[bot] avatar reflash avatar

Watchers

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