Skip to content

Instantly share code, notes, and snippets.

@ldclakmal
Last active August 26, 2021 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldclakmal/3d42c08eb92771163fffe0c6b6d7ab48 to your computer and use it in GitHub Desktop.
Save ldclakmal/3d42c08eb92771163fffe0c6b6d7ab48 to your computer and use it in GitHub Desktop.
import ballerina/http;
listener http:Listener listenerEP = new(9091,
secureSocket = {
key: {
certFile: "/path/to/server-public.crt",
keyFile: "/path/to/server-private.key"
},
mutualSsl: {
verifyClient: http:REQUIRE,
cert: "/path/to/client-public.crt"
}
}
);
service /foo on listenerEP {
resource function get bar() returns json {
// business logic
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment