From 790ad71a2caf2304067af15475d2b122625ad936 Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Sat, 19 Sep 2020 12:56:42 +0530 Subject: [PATCH] Adding more details to Contributing.md for server compilation (#582) --- CONTRIBUTING.md | 29 ++++++++++++++++++++++++++++- app/server/envs/dev.env.example | 13 ++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3cfec62168..3a0f32c209 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,13 +107,40 @@ echo "127.0.0.1 dev.appsmith.com" | sudo tee -a /etc/hosts - We use MongoDB for our database. 1. After cloning the repository, change your directory to `app/server` -2. Run `mvn clean compile`. This generates a bunch of classes required by IntelliJ for compiling the rest of the source code. + +2. Run the command +```bash + 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. + 3. Create a copy of the `envs/dev.env.example` ```shell script cp envs/dev.env.example envs/dev.env ``` +4. Modify the property values in the file `envs/dev.env` to point to your local running instance of MongoDB and Redis. + +5. In order to create the final JAR for the Appsmith server, run the command: +``` +./build.sh +``` + +This command will create a `dist` folder which contains the final packaged jar along with multiple jars for the binaries for plugins as well. + +6. Start the Java server by running + +``` +./scripts/start-dev-server.sh +``` +By default, the server will start on port 8080. + +7. When the server starts, it automatically runs migrations on MongoDB and will populate it with some initial required data. + +8. You can check the status of the server by hitting the endpoint: [http://localhost:8080](http://localhost:8080) on your browser. By default you should see an blank page. + ## 🧪 Running tests ##### Client diff --git a/app/server/envs/dev.env.example b/app/server/envs/dev.env.example index ee294d34da..7a63880366 100644 --- a/app/server/envs/dev.env.example +++ b/app/server/envs/dev.env.example @@ -1,5 +1,16 @@ #!/bin/sh -APPSMITH_MONGODB_URI="mongodb://localhost:27017/mobtools" +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 + +#APPSMITH_OAUTH2_GOOGLE_CLIENT_ID="" +#APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET="" + +#APPSMITH_OAUTH2_GITHUB_CLIENT_ID="" +#APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET="" \ No newline at end of file