mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
chore: NPM Workspaces and scripts (#244)
* chore: NPM Workspaces and scripts - Allows everything to be run in the root directory * chore:Update package-lock after workspace change * docs: Minor docs typo fix - most people run in dev mode, ie vite runs the server, this defaults to that method
This commit is contained in:
parent
8bb4d7d590
commit
95c97561ae
8 changed files with 26511 additions and 50 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -59,6 +59,7 @@ src/style - official.css
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
.idea
|
||||||
|
|
||||||
# meilisearch
|
# meilisearch
|
||||||
meilisearch
|
meilisearch
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "chatgpt-clone",
|
"name": "chat-backend",
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "chatgpt-clone",
|
"name": "chat-frontend",
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
||||||
|
|
@ -88,15 +88,13 @@ You will need all your credentials, (API keys, access tokens, and MongoDB Connec
|
||||||
|
|
||||||
## Run the project
|
## Run the project
|
||||||
|
|
||||||
### Using the command line
|
### Using the command line (in the root directory)
|
||||||
|
|
||||||
1. Run `npm ci` in the "/home/user/chatgpt-clone/api" directory
|
1. Run `npm ci`
|
||||||
2. Run `npm ci` in the "/home/user/chatgpt-clone/client" directory
|
2. Run `npm run frontend-dev`
|
||||||
3. Run `npm run build` in the "/home/user/chatgpt-clone/client"
|
3. Run `npm run backend`
|
||||||
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` in the "/home/user/chat
|
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` (Only if SEARCH=TRUE)
|
||||||
5. Run "meilisearch --master-key put_your_meilesearch_Master_Key_here" in the "/home/user/chatgpt-clone" directory (Only if SEARCH=TRUE)
|
5. Visit http://localhost:3080 (default port) & enjoy
|
||||||
6. Run npm start in the "/home/user/chatgpt-clone/api" directory
|
|
||||||
7. Visit http://localhost:3080 (default port) & enjoy
|
|
||||||
|
|
||||||
### Using a shell script
|
### Using a shell script
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,8 @@ Follow the instructions for setting up proxies, access tokens, and user system:
|
||||||
|
|
||||||
|
|
||||||
- Create a .env file in the api directory by running cp api/.env.example api/.env and edit the file with your preferred text editor, adding the required API keys, access tokens, and MongoDB connection string
|
- Create a .env file in the api directory by running cp api/.env.example api/.env and edit the file with your preferred text editor, adding the required API keys, access tokens, and MongoDB connection string
|
||||||
- Run npm ci in both the api and client directories by running:
|
- Run npm ci root directory `npm ci`
|
||||||
|
- Build the client by running `npm run frontend-dev`
|
||||||
```
|
|
||||||
cd api && npm ci && cd ..
|
|
||||||
cd client && npm ci && cd ..
|
|
||||||
```
|
|
||||||
|
|
||||||
- Build the client by running cd client && npm run build && cd ..
|
|
||||||
|
|
||||||
**Download MeiliSearch for macOS:**
|
**Download MeiliSearch for macOS:**
|
||||||
- You can download the latest MeiliSearch binary for macOS from their GitHub releases page: https://github.com/meilisearch/MeiliSearch/releases. Look for the file named meilisearch-macos-amd64 (or the equivalent for your system architecture) and download it.
|
- You can download the latest MeiliSearch binary for macOS from their GitHub releases page: https://github.com/meilisearch/MeiliSearch/releases. Look for the file named meilisearch-macos-amd64 (or the equivalent for your system architecture) and download it.
|
||||||
|
|
|
||||||
|
|
@ -66,15 +66,13 @@ You will need all your credentials, (API keys, access tokens, and Mongo Connecti
|
||||||
|
|
||||||
### Run the app
|
### Run the app
|
||||||
|
|
||||||
#### Using the command line
|
### Using the command line (in the root directory)
|
||||||
|
|
||||||
- **Run** `npm ci` in the "C:/chatgpt-clone/api" directory
|
1. Run `npm ci`
|
||||||
- **Run** `npm ci` in the "C:/chatgpt-clone/client" directory
|
2. Run `npm run frontend-dev`
|
||||||
- **Run** `npm run build` in the "C:/chatgpt-clone/client"
|
3. Run `npm run backend`
|
||||||
- **Run** `"meilisearch --master-key put_your_meilesearch_Master_Key_here"` in the "C:/chatgpt-clone" directory (Only if SEARCH=TRUE)
|
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` (Only if SEARCH=TRUE)
|
||||||
- **Run** `npm start` in the "C:/chatgpt-clone/api" directory
|
5. Visit http://localhost:3080 (default port) & enjoy
|
||||||
|
|
||||||
- **Visit** http://localhost:3080 (default port) & enjoy
|
|
||||||
|
|
||||||
#### Using a batch file
|
#### Using a batch file
|
||||||
|
|
||||||
|
|
|
||||||
26510
package-lock.json
generated
26510
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,15 @@
|
||||||
"name": "chatgpt-clone",
|
"name": "chatgpt-clone",
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
"workspaces": [
|
||||||
|
"api",
|
||||||
|
"client"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"backend": "cd api && npm run start",
|
||||||
|
"backend-dev": "cd api && npm run server-dev",
|
||||||
|
"frontend": "cd client && npm run build",
|
||||||
|
"frontend-dev": "cd client && npm run dev",
|
||||||
"e2e": "playwright test --config=e2e/playwright.config.js",
|
"e2e": "playwright test --config=e2e/playwright.config.js",
|
||||||
"e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots",
|
"e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots",
|
||||||
"e2e:debug": "cross-env PWDEBUG=1 playwright test --config=e2e/playwright.config.js",
|
"e2e:debug": "cross-env PWDEBUG=1 playwright test --config=e2e/playwright.config.js",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue