2023-08-15 17:34:45 +02:00
|
|
|
# Command history
|
|
|
|
|
|
|
|
Commands were run in the order listed below on a debian based system.
|
|
|
|
|
|
|
|
## Initial setup
|
|
|
|
|
|
|
|
- Initialize go module
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-15 17:34:45 +02:00
|
|
|
```bash
|
|
|
|
go mod init somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList
|
|
|
|
```
|
2023-10-20 13:59:19 +02:00
|
|
|
|
|
|
|
- Install cobra-cli (try `~/go/bin/cobra-cli` if `cobra-cli` can not be found in
|
|
|
|
your `PATH`)
|
2023-08-15 17:34:45 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
go install github.com/spf13/cobra-cli@latest
|
|
|
|
cobra-cli init --viper --license gpl-3.0 --author "gilex-dev gilex-dev@proton.me"
|
|
|
|
```
|
|
|
|
|
|
|
|
- Add missing modules
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-15 17:34:45 +02:00
|
|
|
```bash
|
|
|
|
go mod tidy
|
|
|
|
```
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-19 20:35:29 +02:00
|
|
|
- Add license command
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-19 20:35:29 +02:00
|
|
|
```bash
|
|
|
|
cobra-cli add license
|
|
|
|
```
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-19 23:47:36 +02:00
|
|
|
- Add qglgen
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-08-19 23:47:36 +02:00
|
|
|
```bash
|
|
|
|
printf '// +build tools\npackage tools\nimport (_ "github.com/99designs/gqlgen"\n _ "github.com/99designs/gqlgen/graphql/introspection")' | gofmt > tools.go
|
|
|
|
go mod tidy
|
|
|
|
go run github.com/99designs/gqlgen init --server server/main.go
|
|
|
|
go mod tidy
|
|
|
|
cobra-cli add server
|
|
|
|
```
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
- Add go-sqlite3
|
2023-10-20 13:59:19 +02:00
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
```bash
|
|
|
|
go get github.com/mattn/go-sqlite3
|
|
|
|
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3 # you may need to install gcc if not already present
|
|
|
|
go mod tidy
|
2023-10-20 13:59:19 +02:00
|
|
|
```
|
2023-10-24 16:51:58 +02:00
|
|
|
|
|
|
|
- Add Vite/Vue.js
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pnpm create vite frontend --template vue
|
|
|
|
cd frontend
|
|
|
|
pnpm install
|
|
|
|
```
|
2023-10-26 23:22:42 +02:00
|
|
|
|
|
|
|
- Add Vue-router & Villus
|
|
|
|
```bash
|
|
|
|
cd frontend
|
|
|
|
pnpm install villus graphql
|
|
|
|
pnpm install graphql-tag
|
|
|
|
```
|