Skip to content

This repository serves as a practical resource for grasping the foundational aspects of developing a web application in Go. It provides insights into the practical application of structs and demonstrates the seamless integration of Go with a local Postgres database, enabling comprehensive CRUD (Create, Read, Update, Delete) operations.

License

Notifications You must be signed in to change notification settings

eduardoraider/go-web-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Store Application

This project serves as a practical resource for grasping the foundational aspects of developing a web application in Go. It provides insights into the practical application of structs and demonstrates the seamless integration of Go with a local Postgres database, enabling comprehensive CRUD (Create, Read, Update, Delete) operations.

Learning Topics

By studying this application, you can learn the following topics related to Go programming:

  1. Create a Web Application with Go:: Get hands-on experience in creating a web application using the Go programming language.

  2. Server and Product Struct: Understand how to set up the server and define the product struct for your web application.

  3. Connecting to Database - Postgres: Learn how to connect your Go application to a local Postgres database, enabling data storage and retrieval.

  4. Refactoring and New Product Page: Explore the process of refactoring code for improved maintainability and adding a new product page to your web application.

  5. Deleting Products and Partials: Implement functionality to delete products and work with partials to enhance the user experience.

  6. Updating and Editing Products: Enable users to update and edit product information within your Golang Store.

Running the Application

To run the Golang Store application, follow these steps:

  1. Ensure you have Go installed on your system. If not, you can download and install it from the official Go website.

  2. Make sure you have a local Postgres database set up and running.

  3. Open a terminal or command prompt and navigate to the project directory.

  4. Run the following command to start the application:

    go run main.go

    This will execute the main.go script, which contains the Golang Store application. The application will start a server.

  5. Check the Golang Store in your browser by navigating to the following address:

    http://localhost:8000/

    Here, you can add, edit, and delete products in the Golang Store.

  6. To stop the application and the server, use the Ctrl + C keyboard shortcut in the terminal or command prompt where the application is running.

License

This project is licensed under the MIT License. See the LICENSE file for details.


by Eduardo O Raider

🛠 🥋 Software Engineer

About

This repository serves as a practical resource for grasping the foundational aspects of developing a web application in Go. It provides insights into the practical application of structs and demonstrates the seamless integration of Go with a local Postgres database, enabling comprehensive CRUD (Create, Read, Update, Delete) operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages