同步操作将从 深圳行云创新科技有限公司/pageplug 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This document explains how you can setup a development environment for Appsmith server. As the server codebase is written in Java and is powered by Spring + WebFlux we need Java and Maven installed to build the code. In addition we also need one instance of MongoDB and Redis each to run Appsmith server. Lastly, we will set up IntelliJ IDEA to let you edit the code. Let's get those prerequisites installed on your machine.
You can run the server codebase in a docker container. This is the easiest way to get the server up and running if you are more interested in contributing to the client codebase.
cd
into itgit clone https://github.com/appsmithorg/appsmith.git
cd appsmith
app/server
cd app/server
envs/docker.env.example
cp envs/docker.env.example envs/docker.env
docker-compose up -d
Before you can start to hack on the Appsmith server, your machine should have the following installed:
Docker
.Docker
.This document doesn't provide instructions to install Java and Maven because these vary between different operating systems and distributions. Please refer to the documentation of your operating system or package manager to install these. Next we will setup MondoDB and Redis using Docker
.
The following command will start a MongoDB docker instance locally:
docker run -p 127.0.0.1:27017:27017 --name appsmith-mongodb -e MONGO_INITDB_DATABASE=appsmith -v /path/to/store/data:/data/db mongo
Please change the /path/to/store/data
to a valid path on your system. This is where MongoDB will persist it's data across runs of this container.
Note that this command doesn't set any username or password on the database so we make it accessible only from localhost using the 127.0.0.1:
part in the port mapping argument. Please refer to the documentation of this image to learn how to set a username and password.
MongoDB will now be running on mongodb://localhost:27017/appsmith
.
The following command will start a Redis docker instance locally:
docker run -p 127.0.0.1:6379:6379 --name appsmith-redis redis
Redis will now be running on redis://localhost:6379
.
With the prerequisites met, let's build the code.
app/server
.mvn clean compile
This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. Without this step, your IDE may complain about missing classes and will be unable to compile the code.
envs/dev.env.example
cp envs/dev.env.example .env
This command creates a .env
file in the app/server
folder. All run scripts pick up environment configuration from this file.
Ensure that the environment variables APPSMITH_MONGODB_URI
and APPSMITH_REDIS_URI
in the file .env
point to your local running instances of MongoDB and Redis.
Run the following command to create the final JAR for the Appsmith server:
./build.sh
This command will create a dist
folder which contains the final packaged jar along with multiple jars for plugins as well.
Note:
-DskipTests
flag to the build cmd.sudo APPSMITH_MONGODB_URI="mongodb://localhost:27017/appsmith" APPSMITH_REDIS_URL="redis://127.0.0.1:6379" APPSMITH_MAIL_ENABLED=false APPSMITH_ENCRYPTION_PASSWORD=abcd APPSMITH_ENCRYPTION_SALT=abcd ./build.sh
~/Library/Containers/com.docker.docker/Data/vms/0/
, Ubuntu: /var/lib/docker/
) has less than 2 GB of free space, then the script may fail with the following error:Check failed: Docker environment should have more than 2GB free disk space.
There are two ways to resolve this issue: (1) free up more space (2) change docker's data root path.
./scripts/start-dev-server.sh
By default, the server will start on port 8080.
When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data.
You can check the status of the server by hitting the endpoint: http://localhost:8080 on your browser. By default you should see an HTTP 401 error.
Now the last bit, let's get your Intellij IDEA up and running.
To run the project from within the IDE, you will need to make use of the run configuration that is part of the repository. The run configuration uses the EnvFile plugin to include environment variables in the path. Any and all tests can be run within the IDE by cloning this run configuration.
For being able to run or debug plugins, two are especially important:
-Dpf4j.mode=development -Dpf4j.pluginsDir=appsmith-plugins
.appsmith-server
, appsmith-plugins
etc.Please note when setting Working directory option. If the path is not correct, plugins will fail to load and cannot fetch data from mongo, redis
Happy hacking.
support@appsmith.com
. We'll be happy to help you.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。