diff --git a/README.md b/README.md index 124f0e5..5c9bf37 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ This template is an example project for a simple Large Language Model (LLM) appl These are the available commands: -- `npm start` — This will start a React development server for the frontend app, with a default port of `5173`. -- `npm start-server` — This will start a Node development server for the backend app, with a default port of `3100`. +- `yarn start` — This will start a React development server for the frontend app, with a default port of `5173`. +- `yarn start-server` — This will start a Node development server for the backend app, with a default port of `3100`. -- `npm run build` — This will output a production build of the frontend app in the `dist` directory. -- `npm run preview` — This will run the production build of the frontend app locally with a default port of `5173` (_note_: this will not work if you haven't generated the production build yet). +- `yarn build` — This will output a production build of the frontend app in the `dist` directory. +- `yarn preview` — This will run the production build of the frontend app locally with a default port of `5173` (_note_: this will not work if you haven't generated the production build yet). ## Getting Started @@ -24,7 +24,7 @@ Now you are ready to run the server and the web app. You can use the `-p` flag to specify a port for development. To do this, you can either run `npm start` with an additional flag: ```bash -npm start -- --port 3000 +yarn start -- --port 3000 ``` Or edit the `start` script directly: diff --git a/src/App.jsx b/client/App.jsx similarity index 100% rename from src/App.jsx rename to client/App.jsx diff --git a/src/Chat.jsx b/client/Chat.jsx similarity index 97% rename from src/Chat.jsx rename to client/Chat.jsx index 99525b1..cd016fe 100644 --- a/src/Chat.jsx +++ b/client/Chat.jsx @@ -7,10 +7,10 @@ const Chat = () => { const [userInput, setUserInput] = useState(''); const [loading, setLoading] = useState(false); const [answer, setAnswer] = useState(''); - const [error, setError] = useState(null); + const [error, setError] = useState(''); const handleInputChange = (event) => { - setError(null); + setError(''); setUserInput(event.target.value); }; diff --git a/src/images/keyboard-return-icon.svg b/client/images/keyboard-return-icon.svg similarity index 100% rename from src/images/keyboard-return-icon.svg rename to client/images/keyboard-return-icon.svg diff --git a/src/index.jsx b/client/index.jsx similarity index 100% rename from src/index.jsx rename to client/index.jsx diff --git a/src/services/chat-services.js b/client/services/chat-services.js similarity index 100% rename from src/services/chat-services.js rename to client/services/chat-services.js diff --git a/src/services/request-client.js b/client/services/request-client.js similarity index 100% rename from src/services/request-client.js rename to client/services/request-client.js diff --git a/index.html b/index.html index 085380e..03d3e4d 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,6 @@
- +