Install, Configure and Verify

Clone Github repo

Sixth SDK is currently available for springboot and can be setup as followed.

Clone the repository on your system by running

git clone https://github.com/SixHq/sixth-springboot.git

or download the SDK from the official github repository page here.

Copy Sixth SDK into your project

After cloning or downloading the SDK, copy the root folder from the cloned repository called trysixth/sixth into your src/main/java/com folder, after copying it your folder structure should look like this

Sync Dependencies

The cloned SDK contains a pom.xml that has all the necessary dependencies needed by sixth for it to run, be sure to check the dependencies in this file to be sure your project contains all of the required dependencies.

Configure

Configuration should happen on the main entry point of your application, this should happen in the same file that holds the class or function that starts the Spring application and holds a reference to your Spring application object.

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		// initialize an instance of you spring application
		SpringApplication app = new SpringApplication(DemoApplication.class);
		// create an instance of Sixth SDK immediately after creating an instance of
		// of the application
		Sixth sdk = new Sixth("apikey", app);
		// run the app
		ApplicationContext ctx =  app.run(args);
		// initialize all the necessary resources required for sixth to run properly
		sdk.init(ctx);
	}

}

Sixth dynamically auto-syncs with your codebase, meaning for every endpoint you add or remove from your codebase, sixth automatically detects every endpoint's lifecycle and updates your dashboard accordingly with the details that particular endpoint.

Verify

After configuring Sixth with your application, head over to your dashboard and click on rate limiting, if you have configured everything all your endpoint should be listed there. If not please send us an email at ope@trysixth.com

Last updated