-
Notifications
You must be signed in to change notification settings - Fork 24
Moqui Introduction & Setup
-
You must have your GitHub account created.
-
You must have GIT installed on your computer.
Go to https://git-scm.com/book/en/v2/Getting-Started-Installing-Git to see installation instructions.
-
The Java version should be java 8 or higher. Check java version of your machine.
java -version -
Use MySQL version 5.7.x. Please check the MySQL version in your machine.
-
You should know how to navigate to file directories on your machine via the terminal window, if you are on Linux/Mac.
-
Learn to use Postman for testing the APIs.
Go to https://learning.postman.com/docs/getting-started/introduction/ to learn about Postman.
- https://www.moqui.org/docs/framework/Introduction.
- https://www.moqui.org/m/docs/framework/Run+and+Deploy.
Watch the below video to get an overview for Moqui Framework and setup.
-
Open a Terminal window
-
Go to ~/sandbox (or create the development directory)
-
Clone the Moqui framework repository
git clone -b master https://github.com/hotwax/moqui-framework.git -
Go to moqui-framework directory, add the runtime component
cd moqui-frameworkgit clone -b master https://github.com/hotwax/moqui-runtime.git runtime -
Go to moqui-framework/runtime/component, clone the below required component.
git clone -b master https://github.com/hotwax/mantle.git -
Fork the below repository
https://github.com/hotwax/moqui-tutorial.git -
Clone the repository that you forked above.
-
Run the application from the moqui-framework directory.
./gradlew runNote: Ignore the warnings and errors in the console for Moqui connecting to ElasticSearch.
-
Go to http://localhost:8080
-
Verify that the application is up and running.
Follow the link below to set up the moqui-framework project in the IDE.
https://www.moqui.org/m/docs/framework/IDE+Setup/IntelliJ+IDEA+Setup
Add the xsd locations as given under the heading XML Schemas in the link.
https://www.moqui.org/m/docs/framework/IDE+Setup/IntelliJ+IDEA+Setup
Configure the xsd files for the Entity Definition, Service Definition and Service REST API XML schema locations in your IDE.
-
Watch the below video to get an overview of the database configuration and data load in Moqui.
-
JDBC driver dependencies
MySQL JDBC dependency is already added in the component’s build.gradle that you cloned above.
You can check the dependency in the build.gradle file, added as below.
runtime 'mysql:mysql-connector-java:5.1.47' -
Create Database
Create a database using the following command:
CREATE DATABASE moqui CHARACTER SET utf8 -
Update the Mysql configuration
For Development:
- Update the runtime/conf/MoquiDevConf.xml and add the mysql database name, your user, and password detail
<default-property name="entity_ds_db_conf" value="mysql"/> <default-property name="entity_ds_host" value="127.0.0.1"/> <default-property name="entity_ds_database" value="moqui"/> <default-property name="entity_ds_user" value="moqui"/> <default-property name="entity_ds_password" value="moqui"/>
-
Go to the moqui framework directory and run the command to load data.
./gradlew load