We want to store data and access it from our server in the future. We'll connect to a sqlite database and show the connection status in our template.
- [Instructor] Hi, and welcome back.…In our last videos we created our first route,…and we learned how to use a templating engine…to render a simple, data driven user interface.…For our library app to work, we'll need to store…and access users and their book collections.…In this video, we'll learn how to connect…to a SQLite database from Go,…so we can create, read, update, and delete application data.…We'll start by setting up a SQLite database…on our local machine.…We'll connect to that database with a Go SQL driver…from our server.…In the end, we'll update our template…to display the current database connection status.…
Let's get started by setting up a development database.…The best resource to set up a SQLite database…will be sqlite.org.…Visit the download page to find instructions…for installing the SQLite framework on your machine.…SQLite was made to be easy to install,…so hopefully you won't have too many problems with it.…Also note that the sqlite.org documentation page…will be a great resource on any SQL commands.…
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