From 92f640e252bcb270f4502243e5c1e8354338bffa Mon Sep 17 00:00:00 2001 From: sid palas Date: Sun, 19 Feb 2023 08:50:07 -0500 Subject: [PATCH] improve app readmes and component name --- 05-example-web-application/api-golang/README.md | 15 +++++---------- 05-example-web-application/api-node/README.md | 12 +++++------- 05-example-web-application/client-react/README.md | 7 ++++++- .../client-react/src/App.jsx | 6 +++--- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/05-example-web-application/api-golang/README.md b/05-example-web-application/api-golang/README.md index cd7c4f2..ad5612b 100644 --- a/05-example-web-application/api-golang/README.md +++ b/05-example-web-application/api-golang/README.md @@ -1,11 +1,6 @@ - -``` -go mod init api-golang -go get -u github.com/gin-gonic/gin -go get -u github.com/lib/pq -``` - - -``` -go run src/main.go +```bash +mkdir go-workspace +export GOPATH=$PWD/go-workspace +go mod download +go run main.go ``` \ No newline at end of file diff --git a/05-example-web-application/api-node/README.md b/05-example-web-application/api-node/README.md index 6261068..1420005 100644 --- a/05-example-web-application/api-node/README.md +++ b/05-example-web-application/api-node/README.md @@ -1,8 +1,6 @@ -``` -npm init -npm install express pg -``` - -``` -node src/index.js +```bash +nvm ls +nvm use node 19.4 +npm install +npm run dev ``` \ No newline at end of file diff --git a/05-example-web-application/client-react/README.md b/05-example-web-application/client-react/README.md index 13ce7a9..0cb6dd3 100644 --- a/05-example-web-application/client-react/README.md +++ b/05-example-web-application/client-react/README.md @@ -1,5 +1,10 @@ ``` npm create vite@latest -npm i @tanstack/react-query axios ``` +``` +nvm ls +nvm use node 19.4 +npm install +npm run dev +``` diff --git a/05-example-web-application/client-react/src/App.jsx b/05-example-web-application/client-react/src/App.jsx index 3a13e09..ac7ea83 100644 --- a/05-example-web-application/client-react/src/App.jsx +++ b/05-example-web-application/client-react/src/App.jsx @@ -10,7 +10,7 @@ import './App.css' const queryClient = new QueryClient(); -function Example(props) { +function CurrentTime(props) { const { isLoading, error, data, isFetching } = useQuery({ queryKey: [props.api], queryFn: () => @@ -37,8 +37,8 @@ export function App() { return (

Hey Team! 👋

- - + +
);