YetAnotherToDoList/CMD_HISTORY.md

70 lines
1.3 KiB
Markdown

# Command history
Commands were run in the order listed below on a debian based system.
## Initial setup
- Initialize go module
```bash
go mod init somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList
```
- Install cobra-cli (try `~/go/bin/cobra-cli` if `cobra-cli` can not be found in
your `PATH`)
```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
```bash
go mod tidy
```
- Add license command
```bash
cobra-cli add license
```
- Add qglgen
```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
```
- Add go-sqlite3
```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
```
- Add Vite/Vue.js
```bash
pnpm create vite frontend --template vue
cd frontend
pnpm install
```
- Add Vue-router & Villus
```bash
cd frontend
pnpm install villus graphql
pnpm install graphql-tag
```
- Add go-chi
```bash
go get -u github.com/go-chi/chi/v5
go mod tidy
```