Push Local Changes

Page last updated:

In this step you’ll learn how to propagate a local change to the application through to App Cloud. As a simple change, we’ll modify the title which the app shows.

Change the return value of your app.Run function in the Startup.cs file to “I am awesome!”. Your final result should look something like this:

using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;

namespace CfSampleAppDotNetCore
{
    public class Startup
    {
        public void Configure(IApplicationBuilder app)
        {
            app.Run(context =>
            {
                return context.Response.WriteAsync("I am awesome!");
            });
        }
    }
}

Now test locally:

$ dotnet run

Visiting your application at http://localhost:5000, you should see the changed message. You are awesome!

Now deploy. All you need to do is cf push again:

$ cf push my-dotnetcore-app

Finally, check that everything is working by visiting your app’s URL from your web browser.

I can push local changes
View the source for this page in GitHub