go web
1.0.0
This tutorial uses the AGPL-3.0 open source license
This project is a hands-on project for implementing GoWeb applications in Go language. The project is implemented in the form of separation of front and back ends. The project implements CRUD of the User class and can communicate with MySQL for data. Implemented the KVTObject class to communicate data with Redis.
technology | Introduction |
---|---|
Vue | Vue is a progressive framework for building user interfaces, which is lightweight, efficient, and easy to use. Vue's core library only focuses on the view layer, is very easy to use, and can be integrated with other third-party libraries or existing projects. |
Vite | Vite is a front-end construction tool based on the browser's native ES module. In development mode, the browser's native ES module is used to directly import files to improve construction speed and development efficiency. |
Vue-router | Vue-router is the official routing manager of Vue.js, used to create single-page applications. It maps to components through URLs, realizing the coupling of front-end routing and components. |
ElementPlus | ElementPlus is a UI component library based on Vue 3.0, containing rich components and powerful functions. It is simple and easy to use, efficient and stable, and can quickly build an excellent user interface. |
Axios | Axios is a Promise-based HTTP client that can be used in browsers and Node.js environments. It supports request interception, response interception, request cancellation and other features, and provides an elegant and concise way to handle HTTP requests. |
Go | Go is an efficient and reliable programming language with good concurrent programming and memory management mechanisms. It is widely used in network programming, system programming, cloud computing, artificial intelligence and other fields. |
gin | Gin is a high-performance web framework written in Go language. It is lightweight, high-performance, and easy to use. It is widely used in the development of RESTful APIs. |
gorm | GORM is an ORM framework written in Go language. It supports a variety of databases, including MySQL, PostgreSQL, SQLite, etc. It is easy to use and has rich functions. |
go-redis | go-redis is a Redis client library in the Go language. It provides complete Redis command encapsulation and some additional functions, and is characterized by high performance and ease of use. |
Docker | Docker is an open source containerization platform that can package applications and their dependencies into a portable container, thereby achieving advantages such as rapid deployment and cross-platform portability of applications. Docker also supports image management, container network, storage volumes and other functions, making it more convenient for applications to run in different environments. |
Redis | Redis is a high-performance key-value storage system that supports a variety of data structures, including strings, hashes, lists, sets, ordered sets, etc. Redis is widely used for buffering |
MySQL | MySQL is an open source relational database management system that is low-cost, easy to use, and highly stable. It is widely used in web applications, data warehouses, enterprise applications and other fields. |
Run the backend using the following command:
go run main.go
cd go-web-front-project
npm run dev
Use the following command to build a Redis cluster
docker compose up -d
docker run -it --rm --network=cluster_default redis redis-cli -h cluster-redis-node-0-1 -p 7000 -c
If you like, buy the author a cup of coffee! (A little sponsorship is fine! Thank you very much QWQ)
? Email: [email protected]