Skip to content

Commit

Permalink
add: dev environment configs
Browse files Browse the repository at this point in the history
  • Loading branch information
john-theo committed Sep 27, 2023
1 parent 7a8ef96 commit bd06bbb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .air.toml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

# Dependency directories (remove the comment below to include it)
# vendor/
tmp/

.idea/
bin/
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit bd06bbb

Please sign in to comment.