2. Deploy your app to the cloud

Now that you've created your app, the next step is to deploy it to production.

2.1 Deploy your app to the cloud

Deploying your app to the cloud is as easy as running:

git push encore

This will trigger a build and deploy.

Now head to the Encore web application where you can see production logs and traces, manage environments and configure the cloud hosting of your choice.

Click the Deploy menu item under the prod environment in the menu on the left. Here you will see the deploy once the has build completed successfully.

Once the deploy completes, your app is up and running in production!

2.2 Call your API

To verify that it's running, let's call our API. There are two ways to do this: through the Encore Platform, and directly from the terminal. Let's do both!

On app.encore.dev with your app open, click the API menu item in the menu on the left. You should see the API Documentation for your app, with the hello service and its World endpoint.

Next to the World endpoint, click the Call button on the right-hand side. Then, click Send to make an API call. You should see the response: {"Message": "Hello, World!"}.

Now, open your terminal and run (replace hello-world-4x3b with your own App ID):

$ curl https://hello-world-4x3b.encoreapi.com/prod/hello.World
{"Message": "Hello, world!"}

If you see this, you've successfully deployed and made an API call to your very first Encore app in production. Nicely done!

Next: Learn how to add a SQL database to your service