The ultimate goal of most web applications is to be accessible from any computer through the Internet. We'll push our application to a free cloud platform, Heroku, to expose it to the World Wide Web.
- [Narrator] Hi and welcome back.…In our last video, we checked out a few tools…to help improve the quality and readability of our code.…In this video, we'll break free from our local network…and push our web application to the World Wide Web.…We'll start by updating our library app to work on Heroku.…Then we'll initialize a new Heroku instance and database.…Finally, we'll deploy our app to the web.…Before we can deploy our app to Heroku,…we need to make a few adjustments.…Heroku does not support SQLite databases,…and recommends anyone migrating from SQLite…to use PostgreSQL in the production environment.…
Fortunately, these two flavors of SQL are very similar.…First we need a PostgreSQL driver.…PQ is the most popular Postgre driver currently available.…To install, open a terminal and type…go get github.com/lib/pq…This could take a moment based on your network speed…and computer hardware.…Now let's open our main.go file…and add an import line with the underscore keyword…for the PQ package right underneath the SQLite import.…
Go is on the rise. This open-source programming language (created by Google!) comes with a strong and accessible standard library, and provides a growing ecosystem of tools, libraries, and frameworks that can help you build web applications fast. Go for Web Development gets you started with the language, opening with the classic "Hello world" exercise and culminating in a web application with a strongly designed database back end, useful middleware, UI with an intelligent search function, multi-user authentication, and more.
First, learn how to build a web server with Go's extensive standard library. Explore the concepts behind a single-page web application and learn how to create a dynamic user interface, manipulate a database, and use powerful encryption algorithms to implement an authentication system. Next, you'll incorporate more functionality by calling out to external libraries from the database. Finally, it all comes together into an optimized package you can deploy into the wild with Heroku.
- Creating a route in Go
- Using templates
- Building database connections
- Collecting data
- Using web middleware
- Using the Ace template engine
- Integrating HTTP routers like gorilla/mux
- Authenticating users
- Optimizing a Go codebase