Add development + debugging docker configs

This commit is contained in:
sid palas
2023-02-01 16:15:05 -05:00
parent 15a831b04b
commit bb256c8926
21 changed files with 3752 additions and 26 deletions

View File

@ -0,0 +1,42 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/main"
cmd = "go build -o ./tmp/main ."
delay = 0
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
rerun = false
rerun_delay = 500
send_interrupt = false
stop_on_error = false
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
main_only = false
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
keep_scroll = true

View File

@ -0,0 +1,10 @@
package test
import "testing"
func TestOneEqualsOne(t *testing.T) {
val := 1
if val != 1 {
t.Errorf("1 != %d; want 1", val)
}
}

View File

@ -1,7 +1,12 @@
DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres
.PHONY: run-local
run-local:
DATABASE_URL=postgres://postgres:foobarbaz@localhost:5432/postgres \
node ./src/index.js
DATABASE_URL=${DATABASE_URL} npm run dev
.PHONY: run-local-debug
run-local-debug:
DATABASE_URL=${DATABASE_URL} npm run debug
.PHONY: build-naive
build-naive:

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,9 @@
"main": "src/index.js",
"scripts": {
"dev": "nodemon src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
"debug": "nodemon --inspect ./src/index.js",
"debug-docker": "nodemon --inspect=0.0.0.0:9229 ./src/index.js",
"test": "jest"
},
"author": "",
"license": "ISC",
@ -15,6 +17,7 @@
"pg": "^8.8.0"
},
"devDependencies": {
"jest": "^29.4.1",
"nodemon": "^2.0.20"
}
}

View File

@ -0,0 +1,3 @@
test('This is a test that always passes', () => {
expect(true).toBe(true);
});

View File

@ -14,6 +14,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tanstack/react-query-devtools": "^4.24.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react-swc": "^3.0.0",
@ -558,21 +559,37 @@
"node": ">=10"
}
},
"node_modules/@tanstack/match-sorter-utils": {
"version": "8.7.6",
"resolved": "https://registry.npmjs.org/@tanstack/match-sorter-utils/-/match-sorter-utils-8.7.6.tgz",
"integrity": "sha512-2AMpRiA6QivHOUiBpQAVxjiHAA68Ei23ZUMNaRJrN6omWiSFLoYrxGcT6BXtuzp0Jw4h6HZCmGGIM/gbwebO2A==",
"dev": true,
"dependencies": {
"remove-accents": "0.4.2"
},
"engines": {
"node": ">=12"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/kentcdodds"
}
},
"node_modules/@tanstack/query-core": {
"version": "4.22.4",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.22.4.tgz",
"integrity": "sha512-t79CMwlbBnj+yL82tEcmRN93bL4U3pae2ota4t5NN2z3cIeWw74pzdWrKRwOfTvLcd+b30tC+ciDlfYOKFPGUw==",
"version": "4.24.4",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.24.4.tgz",
"integrity": "sha512-9dqjv9eeB6VHN7lD3cLo16ZAjfjCsdXetSAD5+VyKqLUvcKTL0CklGQRJu+bWzdrS69R6Ea4UZo8obHYZnG6aA==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
}
},
"node_modules/@tanstack/react-query": {
"version": "4.22.4",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.22.4.tgz",
"integrity": "sha512-e5j5Z88XUQGeEPMyz5XF1V0mMf6Da+6URXiTpZfUb9nuHs2nlNoA+EoIvnhccE5b9YT6Yg7kARhn2L7u94M/4A==",
"version": "4.24.4",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.24.4.tgz",
"integrity": "sha512-RpaS/3T/a3pHuZJbIAzAYRu+1nkp+/enr9hfRXDS/mojwx567UiMksoqW4wUFWlwIvWTXyhot2nbIipTKEg55Q==",
"dependencies": {
"@tanstack/query-core": "4.22.4",
"@tanstack/query-core": "4.24.4",
"use-sync-external-store": "^1.2.0"
},
"funding": {
@ -593,6 +610,26 @@
}
}
},
"node_modules/@tanstack/react-query-devtools": {
"version": "4.24.4",
"resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-4.24.4.tgz",
"integrity": "sha512-4mldcR99QDX8k94I+STM9gPsYF+FDAD2EQJvHtxR2HrDNegbfmY474xuW0QUZaNW/vJi09Gak6b6Vy2INWhL6w==",
"dev": true,
"dependencies": {
"@tanstack/match-sorter-utils": "^8.7.0",
"superjson": "^1.10.0",
"use-sync-external-store": "^1.2.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"peerDependencies": {
"@tanstack/react-query": "4.24.4",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@types/prop-types": {
"version": "15.7.5",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
@ -663,6 +700,21 @@
"node": ">= 0.8"
}
},
"node_modules/copy-anything": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.3.tgz",
"integrity": "sha512-fpW2W/BqEzqPp29QS+MwwfisHCQZtiduTe/m8idFo0xbti9fIZ2WVhAsCv4ggFVH3AgCkVdpoOCtQC6gBrdhjw==",
"dev": true,
"dependencies": {
"is-what": "^4.1.8"
},
"engines": {
"node": ">=12.13"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/csstype": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
@ -790,6 +842,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-what": {
"version": "4.1.8",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.8.tgz",
"integrity": "sha512-yq8gMao5upkPoGEU9LsB2P+K3Kt8Q3fQFCGyNCWOAnJAMzEXVV9drYb0TXr42TTliLLhKIBvulgAXgtLLnwzGA==",
"dev": true,
"engines": {
"node": ">=12.13"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@ -901,6 +965,12 @@
"react": "^18.2.0"
}
},
"node_modules/remove-accents": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.4.2.tgz",
"integrity": "sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==",
"dev": true
},
"node_modules/resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
@ -951,6 +1021,18 @@
"node": ">=0.10.0"
}
},
"node_modules/superjson": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/superjson/-/superjson-1.12.2.tgz",
"integrity": "sha512-ugvUo9/WmvWOjstornQhsN/sR9mnGtWGYeTxFuqLb4AiT4QdUavjGFRALCPKWWnAiUJ4HTpytj5e0t5HoMRkXg==",
"dev": true,
"dependencies": {
"copy-anything": "^3.0.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",

View File

@ -15,6 +15,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tanstack/react-query-devtools": "^4.24.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react-swc": "^3.0.0",

View File

@ -1,9 +1,9 @@
import { useState } from 'react'
import {
QueryClient,
QueryClientProvider,
useQuery,
} from "@tanstack/react-query";
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import axios from "axios";
import './App.css'
@ -39,6 +39,7 @@ export function App() {
<h1>Hey Team! 👋</h1>
<Example api="/api/golang/"/>
<Example api="/api/node/"/>
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
);
}