improve app readmes and component name
This commit is contained in:
@ -1,11 +1,6 @@
|
|||||||
|
```bash
|
||||||
```
|
mkdir go-workspace
|
||||||
go mod init api-golang
|
export GOPATH=$PWD/go-workspace
|
||||||
go get -u github.com/gin-gonic/gin
|
go mod download
|
||||||
go get -u github.com/lib/pq
|
go run main.go
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
go run src/main.go
|
|
||||||
```
|
```
|
||||||
@ -1,8 +1,6 @@
|
|||||||
```
|
```bash
|
||||||
npm init
|
nvm ls
|
||||||
npm install express pg
|
nvm use node 19.4
|
||||||
```
|
npm install
|
||||||
|
npm run dev
|
||||||
```
|
|
||||||
node src/index.js
|
|
||||||
```
|
```
|
||||||
@ -1,5 +1,10 @@
|
|||||||
```
|
```
|
||||||
npm create vite@latest
|
npm create vite@latest
|
||||||
npm i @tanstack/react-query axios
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
nvm ls
|
||||||
|
nvm use node 19.4
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import './App.css'
|
|||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
|
|
||||||
function Example(props) {
|
function CurrentTime(props) {
|
||||||
const { isLoading, error, data, isFetching } = useQuery({
|
const { isLoading, error, data, isFetching } = useQuery({
|
||||||
queryKey: [props.api],
|
queryKey: [props.api],
|
||||||
queryFn: () =>
|
queryFn: () =>
|
||||||
@ -37,8 +37,8 @@ export function App() {
|
|||||||
return (
|
return (
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<h1>Hey Team! 👋</h1>
|
<h1>Hey Team! 👋</h1>
|
||||||
<Example api="/api/golang/"/>
|
<CurrentTime api="/api/golang/"/>
|
||||||
<Example api="/api/node/"/>
|
<CurrentTime api="/api/node/"/>
|
||||||
<ReactQueryDevtools initialIsOpen={false} />
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user