Skip to content

chore: NPM Workspaces and scripts #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ src/style - official.css
/playwright/.cache/
.DS_Store
*.code-workspace
.idea

# meilisearch
meilisearch
Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "chatgpt-clone",
"name": "chat-backend",
"version": "0.4.2",
"description": "",
"main": "server/index.js",
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "chatgpt-clone",
"name": "chat-frontend",
"version": "0.4.2",
"description": "",
"type": "module",
Expand Down
16 changes: 7 additions & 9 deletions documents/install/linux_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@ You will need all your credentials, (API keys, access tokens, and MongoDB Connec

## Run the project

### Using the command line

1. Run `npm ci` in the "/home/user/chatgpt-clone/api" directory
2. Run `npm ci` in the "/home/user/chatgpt-clone/client" directory
3. Run `npm run build` in the "/home/user/chatgpt-clone/client"
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` in the "/home/user/chat
5. Run "meilisearch --master-key put_your_meilesearch_Master_Key_here" in the "/home/user/chatgpt-clone" directory (Only if SEARCH=TRUE)
6. Run npm start in the "/home/user/chatgpt-clone/api" directory
7. Visit http://localhost:3080 (default port) & enjoy
### Using the command line (in the root directory)

1. Run `npm ci`
2. Run `npm run frontend-dev`
3. Run `npm run backend`
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` (Only if SEARCH=TRUE)
5. Visit http://localhost:3080 (default port) & enjoy

### Using a shell script

Expand Down
10 changes: 2 additions & 8 deletions documents/install/mac_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- Run npm ci in both the api and client directories by running:

```
cd api && npm ci && cd ..
cd client && npm ci && cd ..
```

- Build the client by running cd client && npm run build && cd ..
- Run npm ci root directory `npm ci`
- Build the client by running `npm run frontend-dev`

**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.
Expand Down
14 changes: 6 additions & 8 deletions documents/install/windows_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,13 @@ You will need all your credentials, (API keys, access tokens, and Mongo Connecti

### 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
- **Run** `npm ci` in the "C:/chatgpt-clone/client" directory
- **Run** `npm run build` in the "C:/chatgpt-clone/client"
- **Run** `"meilisearch --master-key put_your_meilesearch_Master_Key_here"` in the "C:/chatgpt-clone" directory (Only if SEARCH=TRUE)
- **Run** `npm start` in the "C:/chatgpt-clone/api" directory

- **Visit** http://localhost:3080 (default port) & enjoy
1. Run `npm ci`
2. Run `npm run frontend-dev`
3. Run `npm run backend`
4. Run `meilisearch --master-key put_your_meilesearch_Master_Key_here` (Only if SEARCH=TRUE)
5. Visit http://localhost:3080 (default port) & enjoy

#### Using a batch file

Expand Down
Loading