https://github.com/knowledgefactory4u/go-lang-mysql-vue-crud
https://github.com/knowledgefactory4u/go-lang-mysql-vue-crud
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/knowledgefactory4u/go-lang-mysql-vue-crud
- Owner: knowledgefactory4u
- License: gpl-3.0
- Created: 2022-01-22T13:45:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-18T13:46:02.000Z (over 3 years ago)
- Last Synced: 2025-01-14T15:42:59.721Z (5 months ago)
- Language: Vue
- Size: 126 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-lang-mysql-vue-crud
## Backend local setup
**Create database 'userdb':**
```
CREATE DATABASE userdb;
```**Create table 'users':**
```
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`first_name` varchar(200) NOT NULL,
`last_name` varchar(200) NOT NULL,
`email` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id` (`id`);ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL
AUTO_INCREMENT, AUTO_INCREMENT=11;
```**Initialize the Go project:**
Initialize the Go project using the following command
```
go mod init backend
```**Adding the modules required for the project:**
```
go get github.com/gorilla/mux
go get github.com/go-sql-driver/mysql
```
**Run the backend app**
```
go run main.go
```## Frontend local setup
**Step 1: The npm install installs all modules that are listed on package.json file and their
dependencies**
```
npm install
```**Step 2: Run the Frontend application**
```
npm run serve
```Access the url via browser - http://localhost:8080/