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).
## Getting Started
### Run by source code
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/).
First, install the dependencies:
@ -14,6 +17,7 @@ yarn install --frozen-lockfile
```
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:
```
# For production release, change this to PRODUCTION
NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT
@ -45,27 +49,35 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
You can start editing the file under folder `app`. The page auto-updates as you edit the file.
## Deploy
### Deploy on server
First, build the app for production:
```bash
npm run build
```
Then, start the server:
```bash
npm run start
```
If you want to customize the host and port:
```bash
npm run start --port=3001 --host=0.0.0.0
```
## Lint Code
If your IDE is VSCode, rename `web/.vscode/settings.example.json` to `web/.vscode/settings.json` for lint code setting.
## Documentation
Visit https://docs.dify.ai/getting-started/readme to view the full documentation.
Visit <https://docs.dify.ai/getting-started/readme> to view the full documentation.
## Community
The Dify community can be found on [Discord community](https://discord.gg/5AEfbxcd9k), where you can ask questions, voice ideas, and share your projects.