-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Mockpit natively
To run Mockpit natively, you need to have the following tools installed on your machine:
- Java 11
- Maven
- Node 14.21
- Angular 15
- PostgreSQL 15
Fetch the latest version of Mockpit by running the following Git command:
git clone https://github.com/sranmanpreet/mockpit.git
Navigate to newly created directory with:
cd mockpit
Open the file server/src/main/resources/application.yml and configure the datasource properties. For example, to set up a PostgreSQL Database, use these configurations:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/moock #your database jdbc url here
username: postgres #your database username here
password: postgres #your database password here
driver-class-name: org.postgresql.Driver #your database Driver here
Navigate to the server directory at the project root:
cd server
Install required dependencies and build the JAR using the following Maven command. This will create a JAR in the mockpit/server/target directory:
mvn clean install -U
Run the JAR using the following Java command:
java -jar target/mockpit-<version>-RELEASE.jar
By default, the server will be deployed at http://localhost:8080. You can change the port from the application configurations.
Navigate to the client directory at the project root:
cd client
Install the required node_modules using the following npm command:
npm install
Set the backend URL in mockpit/client/mockpit-ui/src/assets/config/config.json to point to the Mockpit server:
{
"backendUrl": "http://localhost:8080"
}
Run the client using the following command:
npm start
The client will be deployed at http://localhost:4200 by default. You can change the default port using the command line or the angular.json file.