Skip to content

apihug/simplest-demo

Repository files navigation

Getting Started

English | 简体中文

  1. 💝 SDK:
  2. 💝 Plugin: ApiHug - API design Copilot

Quick Build

0. Build All

Pass by flag -DonlyProto=true to build proto modules separately: gradlew clean build -x test -x wireTest -DonlyProto=true (remove the -x stubTest as only application modules has this task).

#windows
./gradlew.bat clean build -x test -x wireTest -x stubTest
#others
sh gradlew clean build -x test -x wireTest -x stubTest

1. Build Wire (Individual Optional)

#windows
./gradlew.bat demo-app-proto:clean wire build -x test -x wireTest
#others
sh gradlew demo-app-proto:clean wire build -x test -x wireTest

Build proto ONLY, check settings.gradle for detail, pass -DonlyProto=true:

#windows
./gradlew.bat clean build -x test -x wireTest -DonlyProto=true
#others
sh gradlew clean build -x test -x wireTest -DonlyProto=true

2. Build Stub (Individual)

Everytime you update application's dependence proto libraries, please run this command to re-generate your stubs.

#windows
./gradlew.bat demo-app:clean stub build -x test -x stubTest

Lite compile quick(since 0.7.8-RELEASE default as true, you can switch to false manually -Dlite=false:

#windows
./gradlew.bat demo-app:clean stub build -x test -x stubTest
#others
sh gradlew demo-app:clean stub build -x test -x stubTest

Lite compile quick:

#others
sh gradlew demo-app:clean stub build -x test -x stubTest -Dlite=true

3. Run Application

#windows
./gradlew.bat demo-app:bootRun
#others
sh gradlew demo-app:bootRun

👍Then just kick off the application, in logger output you will find:

Application 'demo-app' is running! Access URLs:

	Local                             http://localhost:18899/                                         
	External                          http://192.168.0.1:18899/                                        
	OAS                               http://192.168.0.1:18899/v3/api-docs                             
	Actuator                          http://192.168.0.1:18899/management                              
	Profile(s)                        dev    

🥳 Congratulations! You have successfully started your application!

Reference Documentation

For further reference, please consider the following sections:

  1. Apihug.com GitHub
  2. Apihug Wire Plugin
  3. Apihug Stub Plugin
  4. Apihug Trivial
  5. Apihug FAQ
  6. Official Gradle documentation
  7. Spring Boot Gradle Plugin Reference Guide
  8. ApiHug - API design Copilot IDEA Plugin
  9. ApiHug - IDEA FAQ
  10. ApiHug - IDEA Handbook
  11. ApiHug101-Bilibili
  12. ApiHug101-Youtube
  13. ApiHug Home

About

apihug simplest project template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages