Installation - Zeta-Project/zeta GitHub Wiki
Setup
Check out this repository. It needs to be located in an folder called zeta.
To setup Zeta for development mode, you need:
- Java 11 JDK
- sbt version >= 1.1.6
- Docker
- IntelliJ Ultimate Edition. This is free for students.
- MongoDB <= 3.x
- Node.js
- Yarn:
npm install -g yarn(under Windows you can use the yarn installer)
You need to setup 3 things:
- MongoDB:
- To start, call in command line:
mongod(.exe) --dbpath "*full path to where I want my Docker files to be stored*". - You can also create a batch/shell script containing this command. In Windows you should replace
mongodwith the full path to mongod in double quotes. It also helps to add apause/readat the end to catch possible errors if MongoDB shuts down unexpectedly.
- To start, call in command line:
- Frontend:
- Make sure Yarn is installed.
- Clone the yFiles repositories at the same level as your Zeta repo. It should look like this:
. ├── yFiles-dev-key ├── yFiles-for-html │ ├── impl │ └── typings └── zeta ├── api ├── frontend └── mongodb cdinto the frontend directory.- Call
yarn. - To start, call
yarn serve.
- IntelliJ IDEA:
- File | Open -> folder zeta/api
- VCS | Enable Version Control Integration -> git
- Navigate to build.sbt and enable sbt integration if asked.
- View | Tool Windows | SBT -> press the "Reload all sbt projects" button.
- Run | Edit Configurations... ->
+-> Play 2 App- Play2 Module =
zeta-api(Make sure it is plainzeta-apiwithout a number. If there is not plainzeta-api, wait for indexing.) - Environment variables ->
...- name =
ZETA_DEPLOYMENTvalue =development
- name =
- Play2 Module =
- Run the new configuration.
Error Handling
Run
- Use Java SDK 11 (via File -> Project Structure -> Project -> Project SDK)
- Exclude Target Sources in Project Structure (via File -> Project Structure -> Modules)
- Use Scala SDK 2.12.12 (via File -> Project Structure -> Global Libraries)
- Afterwards press:
File | Invalidate Caches/ Restart .... Then try to run Play2 again. If you get the error message:Unrecognized option: -J-Xmx4Gremove the-J-from the.sbtoptsfile. - View | Tool Windows | SBT -> press the "Reload all sbt projects" button.
Build
- Use
sbt compilein a terminal orcompilein the sbt shell.
Start
To start Zeta in development mode, you need to start 3 things.
-
MongoDB: Execute your script or call in command line:
mongod(.exe) --dbpath "*full path to where I want my Docker files to be stored*". -
Frontend: In command line, navigate to zeta/frontend/. Now call:
yarn serve. -
IntelliJ IDEA: Make sure that all sbt packages are loaded and indexing is complete. This may take some time. Feel free to grab a snack or coffee while waiting. Start the Play2 configuration you created. If you are getting an error in zeta/api/server/server.sbt file caused by ZetaBuild, try to delete the two folders:
zeta/api/project/projectzeta/api/project/target
Afterwards press:
File | Invalidate Caches/ Restart .... Then try to run Play2 again.
If you change something in the code you just need to press refresh and IntelliJ will recompile the project.