Project details: Nuggets Articles
Tool library:
TopBar Status Bar:
Open and close the APP:
Start LaunchedPad:
Terminal
TurboChat
ChatGPT
VSCode
Go to the github project address to pull the project source code.
The terminal enters the folder directory and runs npm install or pnpm install
Create .env files in the client and server folders respectively
client/.env
NEXT_PUBLIC_OPENAI_API_KEY= 你自己的 OpenAI Key
NEXT_PUBLIC_NODE_ENV= dev
# 部署到服务器相关
# NEXT_PUBLIC_HOST = 例如https://175.24.18:8080/
# NEXT_PUBLIC_WEBSOCKET = 例如https://175.24.18:81/
server/.env
# 部署上线 mysql
# DATABASE_URL= "mysql://ljq:[email protected]:3306/my_mac"
# 本地mysql 将自己的 usernamepassworddatabase名字换入
DATABASE_URL= "mysql://username:password@localhost:3306/database"
# 下面为腾讯云 ID 和 KEY 填入自己的信息
TX_SECRET_ID = 'AKID8J....'
TX_SECRET_KEY = 'vaz81....'
# COS 存储桶
TX_BUCKET = 'turbomac-13093...'
TX_REGION = 'ap-shanghai'
cd enters the server folder, executes npx prisma migrate dev --name init to initialize the database, and executes prisma generate to use prisma client.
There are two ways to run client and server:
npm run dev or pnpm run dev respectivelyturbo dev directly in the root directory After running, the server will be on port 8080 and the client will be on port 3000. Open localhost:3000 and you will see the page. Registered user: Go to postman/apifox and other interface request tools, register user interface: http://localhost:8080/register
Log in to TurboChat