From the course: Cloud Native Projects: GCP Serverless
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Deploying and running a Java Cloud Function - Google Cloud Platform Tutorial
From the course: Cloud Native Projects: GCP Serverless
Deploying and running a Java Cloud Function
- [Instructor] So now that we've written our code in Java, it's time for us to deploy it, run it and test it as a Java Cloud function. So back in our (indistinct), before we do anything, let's run this locally and see what happens. So we're going to pop up a terminal here and we are going to do a mvn function run. And you'll see that we now are running our function at Local Host 8080. So I'm going to pop up in a new terminal here and I'm going to use a tool called HTTPIE. Of course you can do all of this with Curl. It's just what I use. It's just a command line tool and I just type HTTP to get to it. Again, Curl works equally as effective. And I'm going to post to Local Host 8080. You'll see that we got a stack trace. And the stack trace is because we've got a no pointer exception that we're not handling very well. We could obviously clean that up but for the purposes of this, it's fine. If you want to clean it up, feel…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.