This is a simple Go web application that serves as a starting point for building web applications using the Go programming language.
- Basic web application structure in Go.
- Web framework using the Gin router.
- PostgreSQL database integration using the
github.com/lib/pq
driver. - Session management using Gorilla Sessions.
- User authentication and authorization.
Follow these instructions to get the project up and running on your local machine.
- Go (1.20 or later)
- PostgreSQL (15.2)
-
Clone the repository:
git clone https://github.com/dituanson/go-webapp.git
-
Change to the project directory:
cd go-webapp
-
Install dependencies:
go mod tidy
-
Set up your PostgreSQL database and update the database configuration in
config/db.go
. -
Build and run the application:
go run main.go
The web application should now be running locally at http://localhost:8080
.
The application is a simple web app with user authentication and a basic user management system. You can use it as a starting point for your own web projects.
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Commit your changes and push them to your fork.
- Create a pull request to this repository's
main
branch.
Please ensure your code follows the project's coding standards and includes tests when necessary.
If you have any questions or issues, please feel free to open an issue on the GitHub repository or contact the project owner at [[email protected]].