Skip to content

Commit 626a3a1

Browse files
authored
Update README.md
1 parent 5aa7131 commit 626a3a1

File tree

1 file changed

+9
-40
lines changed

1 file changed

+9
-40
lines changed

README.md

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# LLM React App Javascript Template
22

3-
## What is a LLM React App Javascript Template?
3+
## What is an LLM React Node App Javascript Template?
44

5-
This a template project for a simple chat app connected to a Large Language Model (LLM). This is built on top of [the React template app from nano-react-app](https://github.com/nano-react-app/template-js). To connect the React app to an LLM, a Node server has been added to the project.
5+
This template is an example project for a simple Large Language Model (LLM) application built on top of React and Node. This template was built on top of [the React template app from nano-react-app](https://github.com/nano-react-app/template-js) and updated with a Node server that uses [LangChain.js](https://github.com/hwchase17/langchainjs) to connect to supported large language models, e.g. OpenAI and Hugging Face. Use this template to easily build and run an LLM app, like the screenshot below:
6+
7+
![](./examples/llm-react-app.png)
68

79
These are the available commands:
810

9-
- `npm start-server` — This will start a development node backend server with a default port of `3100`.
10-
- `npm start` — This will start a development server for the react frontend app with a default port of `5173`.
11-
- `npm run build` — This will output a production build in the `dist` directory.
12-
- `npm run preview` — This will run the production build locally with a default port of `5173` (this will not work if you haven't generated the production build yet).
11+
- `npm start` — This will start a React development server for the frontend app, with a default port of `5173`.
12+
- `npm start-server` — This will start a Node development server for the backend app, with a default port of `3100`.
13+
14+
- `npm run build` — This will output a production build of the frontend app in the `dist` directory.
15+
- `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).
1316

1417
## Getting Started
1518

@@ -29,37 +32,3 @@ Or edit the `start` script directly:
2932
```bash
3033
vite --port 3000
3134
```
32-
33-
## Adding styles
34-
35-
You can use CSS files with simple ES2015 `import` statements anywhere in your Javascript:
36-
37-
```js
38-
import "./index.css";
39-
```
40-
41-
## Babel transforms
42-
43-
The Babel preset [babel-preset-nano-react-app](https://github.com/nano-react-app/babel-preset-nano-react-app) is used to support the same transforms that Create React App supports.
44-
45-
The Babel configuration lives inside `package.json` and will override an external `.babelrc` file, so if you want to use `.babelrc` remember to delete the `babel` property inside `package.json`.
46-
47-
## Deploy to GitHub Pages
48-
49-
You can also deploy your project using GitHub pages.
50-
First install the `gh-pages` [package](https://github.com/tschaub/gh-pages):
51-
52-
`npm i -D gh-pages`
53-
54-
Use the following scripts for deployment:
55-
56-
```js
57-
"scripts": {
58-
"start": "vite",
59-
"build": "vite build",
60-
"predeploy": "rm -rf dist && vite build",
61-
"deploy": "gh-pages -d dist"
62-
},
63-
```
64-
65-
Then follow the normal procedure in GitHub Pages and select the `gh-pages` branch.

0 commit comments

Comments
 (0)