Skip to content

gauravjatt4k/ChatGptApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

😍ChatGptApi

📝Short description :-

This is bun open source project and using express js and react, open ai module. very fast and beginner friendly project

⚙ Setup and run with bun :-

  1. Clone the repository and download the code.

  2. Open your preferred code editor.

  3. Create a .env file in the project directory and add your OpenAI API key to it. Make sure it looks like this:


OPENAI_API_KEY=YOUR_API_KEY_HERE

Replace YOUR_API_KEY_HERE with your actual OpenAI API key.

  1. Open your terminal/command prompt and navigate to the project directory.

  2. Run the following commands:

bun install

bun dev

This will install the necessary dependencies and start the development server using Bun.

⚙ Setup and run with node :-

  1. Clone the repository and download the code.

  2. Open your preferred code editor.

  3. Create a .env file in the project directory and add your OpenAI API key to it, just like in the Bun setup:


OPENAI_API_KEY=YOUR_API_KEY_HERE

  1. If there's a file named bun.lock, delete it.

  2. Open the package.json file in your code editor.

  3. Locate the "dev" script and replace it with the following:

"dev": "node App.js"
  1. Open your terminal/command prompt and navigate to the project directory.

  2. Run the following commands:

npm install

npm run dev

This will install the required dependencies and start the development server using Node.js.

Now you should be able to run your project using both Bun and Node.js. If you encounter any issues or have further questions, feel free to ask for assistance.

💻 Pc view demo

enter image description here

📱 Mobile view demo

enter image description here