diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..968ae0f --- /dev/null +++ b/.air.toml @@ -0,0 +1,19 @@ +root = "." +tmp_dir = "tmp" + +[build] + bin = "./tmp/main" + cmd = "go build -o ./tmp/main ./cmd/" + delay = 0 + exclude_dir = ["assets", "tmp", "examples"] + include_ext = ["go"] + log = "build-errors.log" + poll_interval = 0 + rerun = false + +[misc] + clean_on_exit = false + +[screen] + clear_on_rebuild = false + keep_scroll = true diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d73628e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +{ + "name": "Air", + "image": "cosmtrek/air", + "forwardPorts": [ + "8080:8080" + ], + "mounts": [ + "source=${localWorkspaceFolder},target=/go/src/github.com/cosmtrek/hub,type=bind" + ], + "workspaceFolder": "/go/src/github.com/cosmtrek/hub", + "postCreateCommand": "go mod download && air", + "customizations": { + "vscode": { + "terminal.integrated.cwd": "/go/src/github.com/cosmtrek/hub" + } + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 44f88c7..e76355a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ # Dependency directories (remove the comment below to include it) # vendor/ +tmp/ .idea/ bin/ diff --git a/README.md b/README.md index 018a230..2c928b8 100644 --- a/README.md +++ b/README.md @@ -259,5 +259,7 @@ azure-openai: - chatgpt-ns ```` +## Develop +Start [DevContainer](https://code.visualstudio.com/docs/devcontainers/containers#_getting-started) in VSCode / IntelliJ and you are good to go 😉, docker is the ONLY dependency.