Having already configured GitHub Actions for my Angular projects, the next step was to setup my ASP.NET Core Web APIs. I will run through setting up the GitHub action, creating a GitHub secret with the Azure App Service publish profile.

This will follow the same format as my previous post Angular Deployment with GitHub Actions without the run through of the keywords in the yaml file.

Here is the official Azure WebApp Actions page and here is the official asp.net-core-webapp-on-azure.yml example, you’ll find my example is basically the same with a couple of changes to suit my needs.

So here…


As of writing this post, GitHub Container Registry (GHCR)is currently in public BETA, for more information check this link.

Note: GitHub Container Registry is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use GitHub Container Registry, you must enable the feature for your account. For more information, see “Enabling improved container support.”

I like Docker and I use GitHub everyday, so it makes sense to use GHCR to store my Docker images, and when out of beta start using GitHub Actions to automate my workflows.

Initially I started using Azure Container…


Finally… I’ve started to use GitHub Actions with Angular, I’ve been meaning to look into this for a while now and I’ve done it.

This post will only cover the yaml file required to create your CI/CD workflow, my example uses a Node.js environmentt to builds the project and transfers the dist folder content to an Azure App Service using FTP.

This does not necessarily have to be an Angular project, as you can build a React or Vue project and FTP it’s contents the same way, but as Angular is my preferred framework, it will be so.

main.yml

Angular deployment…

This post will be a quick guide to using SendGrid Inbound Parse with Express.js. By the end of this post you’ll be able to parse incoming emails and inspect the data. This will be great for a helpdesk type application.

Prerequisites

  • SendGrid Account
  • Your own domain
  • Node.js
  • Ngrok (testing tool)

Here’s my GitHub repo express-sendgrid-inbound-parse if you want to skip Creating the project part.

Creating the project

Let’s start with creating our express app. Find a directory to add your project to, then…

  • mkdir express-sendgrid-inbound-parse
  • cd express-sendgrid-inbound-parse
  • touch index.js
  • npm init -y to create a default package.json file
  • npm install express multer
  • npm install…


Environment variables are an important part of all projects, passing configuration settings, connection strings, etc, from local to production environments.

By the end of this post, you’ll be able to configure both local and Azure App Service environment variables for your node express app using VS Code.

We’ll start from scratch with a basic express application.

Prerequisites

  • Node.js
  • Visual Studio Code (VS Code)
  • Microsoft Azure Account

Local Development

First, follow these steps to create the project.

  • mkdir node-express-envs
  • cd node-express-envs
  • touch index.js
  • npm init -y to create a default package.json file
  • npm install express
  • npm install nodemon dotenv --save-dev
  • code . to open…

This post covers two types of directive, one which can be used at runtime, sometimes referred to as a Query-Type Directive and the other used as part of the SDL (Schema Definition Language) sometimes referred to as a Schema-Type Directive.

Custom directives are not covered in this post.

Query Directives

Here’s a section from graphql.org

A directive can be attached to a field or fragment inclusion, and can affect execution of the query in any way the server desires. The core GraphQL specification includes exactly two directives, which must be supported by any spec-compliant GraphQL server implementation:

@include(if: Boolean) Only include this…


First of, I found this a time consuming task just to figure out where to start, how to test this functionality and whehter I should switch to use Apollo instead, as there are many resource out there that show how subscriptions work well with their approach, not to forget the Apollo graphiql tool allows you to test subscriptions.

After a lot of searching, many articles read and videos watched, I kept coming back to GitHub’s graphql/express-graphql issues page where several people, dating back to August 2017 have been wanting to implement subscriptions. …


One thing I really wanted to figure out as soon as I went throught the basics of GraphQL is whether you could separate your project schema file into several different schema type definitions files.
As you’re adding more query types to to your schema file and functions to your resolvers, you can see it slowly becoming more and more difficult to manage, and searching through a file with many lines is no fun.

So… first thing to workout is how we can separate our schema into several files and then create a folder structure to manage those files.

There’s an…


This post carries on from my previous and first post about Auth with GraphQL. The examples below are used with express-graphql.

Make efficient queries (N+1 Problem)

So when you start nesting your queries you’ll soon find out that GraphQL is not very efficient and makes database requests for each nested query.

For example, if you have a list of students, each student can have a number of classes. You make 1 request for the students which gives us the N number, which is the number of requests for each the student classes to fetch.

1 request for students returns N students. …

I have been developing RESTful services for some 6+ years now and GraphQL for the last year has been on my mind to explore, to see if it can be an alternative to my approach of creating web services.

I used Node.js and there are many GraphQL libraries to choose from, I opted for Express GraphQL.

“The reference implementation of a GraphQL API server over an Express webserver. You can use this to run GraphQL in conjunction with a regular Express webserver, or as a standalone GraphQL server.”

After a lot of searching, reading and watching, I found that Apollo…

Sander Hammelburg

Lead Developer. Angular. Node. GraphQL. JavaScript enthusiast.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store