Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Dify Frontend
  2. This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
  3. ## Getting Started
  4. ### Run by source code
  5. To start the web frontend service, you will need [Node.js v18.x (LTS)](https://nodejs.org/en) and [NPM version 8.x.x](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/).
  6. First, install the dependencies:
  7. ```bash
  8. npm install
  9. # or
  10. yarn
  11. ```
  12. Then, configure the environment variables. Create a file named `.env.local` in the current directory and copy the contents from `.env.example`. Modify the values of these environment variables according to your requirements:
  13. ```
  14. # For production release, change this to PRODUCTION
  15. NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT
  16. # The deployment edition, SELF_HOSTED or CLOUD
  17. NEXT_PUBLIC_EDITION=SELF_HOSTED
  18. # The base URL of console application, refers to the Console base URL of WEB service if console domain is
  19. # different from api or web app domain.
  20. # example: http://cloud.dify.ai/console/api
  21. NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
  22. # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from
  23. # console or api domain.
  24. # example: http://udify.app/api
  25. NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
  26. # SENTRY
  27. NEXT_PUBLIC_SENTRY_DSN=
  28. ```
  29. Finally, run the development server:
  30. ```bash
  31. npm run dev
  32. # or
  33. yarn dev
  34. ```
  35. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
  36. You can start editing the file under folder `app`. The page auto-updates as you edit the file.
  37. ## Deploy
  38. ### Deploy on server
  39. First, build the app for production:
  40. ```bash
  41. npm run build
  42. ```
  43. Then, start the server:
  44. ```bash
  45. npm run start
  46. ```
  47. If you want to customize the host and port:
  48. ```bash
  49. npm run start --port=3001 --host=0.0.0.0
  50. ```
  51. ## Lint Code
  52. If your IDE is VSCode, rename `web/.vscode/settings.example.json` to `web/.vscode/settings.json` for lint code setting.
  53. ## Documentation
  54. Visit https://docs.dify.ai/getting-started/readme to view the full documentation.
  55. ## Community
  56. The Dify community can be found on [Discord community](https://discord.gg/5AEfbxcd9k), where you can ask questions, voice ideas, and share your projects.