mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 16:28:12 +00:00
feat(onboarding): backend api for onboarding users
This commit is contained in:
+20
-1
@@ -35,6 +35,7 @@ import {
|
||||
import { apiKeyData as v3apiKeyDataRouter } from "./ee/routes/v3";
|
||||
import { serviceTokenData as v3ServiceTokenDataRouter } from "./ee/routes/v3";
|
||||
import {
|
||||
admin as v1AdminRouter,
|
||||
auth as v1AuthRouter,
|
||||
bot as v1BotRouter,
|
||||
integrationAuth as v1IntegrationAuthRouter,
|
||||
@@ -94,6 +95,7 @@ import { syncSecretsToThirdPartyServices } from "./queues/integrations/syncSecre
|
||||
import { githubPushEventSecretScan } from "./queues/secret-scanning/githubScanPushEvent";
|
||||
const SmeeClient = require("smee-client"); // eslint-disable-line
|
||||
import path from "path";
|
||||
import { serverConfigInit } from "./config/serverConfig";
|
||||
|
||||
let handler: null | any = null;
|
||||
|
||||
@@ -101,6 +103,7 @@ const main = async () => {
|
||||
const port = await getPort();
|
||||
|
||||
await setup();
|
||||
const serverCfg = await serverConfigInit();
|
||||
|
||||
await EELicenseService.initGlobalFeatureSet();
|
||||
|
||||
@@ -203,6 +206,7 @@ const main = async () => {
|
||||
// v1 routes
|
||||
app.use("/api/v1/signup", v1SignupRouter);
|
||||
app.use("/api/v1/auth", v1AuthRouter);
|
||||
app.use("/api/v1/admin", v1AdminRouter);
|
||||
app.use("/api/v1/bot", v1BotRouter);
|
||||
app.use("/api/v1/user", v1UserRouter);
|
||||
app.use("/api/v1/user-action", v1UserActionRouter);
|
||||
@@ -271,7 +275,22 @@ const main = async () => {
|
||||
app.use(requestErrorHandler);
|
||||
|
||||
const server = app.listen(port, async () => {
|
||||
logger.info(`Server started listening at port ${port}`);
|
||||
if (!serverCfg.initialized) {
|
||||
logger.info(`Welcome to Infisical
|
||||
|
||||
Create your Infisical administrator account at:
|
||||
http://localhost:${port}/admin/signup
|
||||
`);
|
||||
} else {
|
||||
logger.info(`Welcome back!
|
||||
|
||||
To access Infisical Administrator Panel open
|
||||
http://localhost:${port}/admin
|
||||
|
||||
To access Infisical server
|
||||
http://localhost:${port}
|
||||
`);
|
||||
}
|
||||
});
|
||||
|
||||
// await createTestUserForDevelopment();
|
||||
|
||||
Reference in New Issue
Block a user