mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 22:03:00 +00:00
29 lines
557 B
TypeScript
29 lines
557 B
TypeScript
import {
|
|
ZitadelServerOptions,
|
|
getServer,
|
|
getServers,
|
|
initializeServer,
|
|
} from "#";
|
|
import { GetMyUserResponse, getAuth } from "#/auth";
|
|
|
|
async function getMyUser(): Promise<GetMyUserResponse> {
|
|
const auth = await getAuth();
|
|
const response = await auth.getMyUser({});
|
|
return response;
|
|
}
|
|
|
|
async function main() {
|
|
const zitadelConfig: ZitadelServerOptions = {
|
|
apiUrl: "https://dev-mfhquc.zitadel.cloud/",
|
|
token: "123",
|
|
};
|
|
|
|
if (!getServers().length) {
|
|
initializeServer(zitadelConfig);
|
|
}
|
|
|
|
const app = getServer();
|
|
}
|
|
|
|
main();
|