There should be a link on your web app project page, or you can click here. Next, we need to download the App Engine SDK, which is a set of tools that allow you to deploy your web app on App Engine. You’ll need this ID in a minute! Download the SDK Notice the Project ID in the Project info cell in the upper-left corner. Go to the Google Cloud Platform dashboard and select your project from the dropdown, if it’s not already selected. That opens up a console in your web browser. Open the Google Cloud Shell using by clicking the >_ icon in the upper-right corner. Now that we’ve created a project, we need to create an app in that project. You’ll end up on your web app project page, which will be empty to start with. Give it any name you want, and select a region. Go to your App Engine Dashboard and create a web app project. Like its name suggests, Google Cloud Platform is a set of tools and services that allow you to deploy your web app in the Google cloud… the same computers that run Google! Create a Projectīefore we can deploy our web app, we need to follow these instructions and create a Cloud Platform and App Engine project. (And it’s a good idea to do that before trying to deploy to a live site!) But we’re going to deploy this to Google App Engine instead. This is just a simple example, but it contains a servlet, a JSP file, and a static file, so it should be a reasonable stand-in for more complicated stuff.Īt this point you could copy this directory into the webapps folder of your local Jetty server. Hopefully by now that all seems pretty straightforward to you. Putting it all together, our web app directory should look like this: SimpleServlet SimpleServlet SimpleServlet /home Let’s create an example web app using the command line. You might want to check whether the host you’re already using offers server-side hosting, but usually they’re two separate things. Simple file hosting will work for static files, but you need server-side hosting if you want to actually run code on a server. Note that this is more involved than the basic file hosting we talked about in the HTML tutorials. You can google something like “turn my computer into a server” if you want to do that, but this tutorial uses Google App Engine to host our server in the Google cloud. It’s possible to use your computer as a “real” server that other people can access. But if you want other people to be able to visit your web app, you have to host your server somewhere. Running locally is a good habit to get into, because you want to test your changes before you unveil them to the entire world. So far, we’ve been developing locally by turning our own computers into a server that we access using the localhost:8080 URL. You can run appcfg.py from the SDK directory or using the absolute path.Hosting on Google App Engine tutorial java server hosting google-app-engine The SDK doesn't need to be installed, doesn't need to be in path. Simply download the SKD, extract it somewhere (on my Mac, I link it to /usr/local/google_appengine because some script like nosegae expects it there, but it's not necessary). The linux version on the documentation download page contains only the SDK, or get it on the Google App Engine googlecode project (it will be called google_appengine_x.x.x.zip): Either use the SDK that comes with installer or download the SDK alone. As far as I know the SDK is pure Python and portable. The Windows and OS X packages are just the the SDK and the GUI launcher.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |