MCPcopy Create free account
hub / github.com/PalisadoesFoundation/talawa-api / caddySetup

Function caddySetup

scripts/setup/setup.ts:1143–1189  ·  view source on GitHub ↗
(answers: SetupAnswers)

Source from the content-addressed store, hash-verified

1141 return answers;
1142}
1143export async function caddySetup(answers: SetupAnswers): Promise<SetupAnswers> {
1144 try {
1145 answers.CADDY_HTTP_MAPPED_PORT = await promptInput(
1146 "CADDY_HTTP_MAPPED_PORT",
1147 "Caddy HTTP mapped port:",
1148 "80",
1149 validatePort,
1150 );
1151 answers.CADDY_HTTPS_MAPPED_PORT = await promptInput(
1152 "CADDY_HTTPS_MAPPED_PORT",
1153 "Caddy HTTPS mapped port:",
1154 "443",
1155 validatePort,
1156 );
1157 answers.CADDY_HTTP3_MAPPED_PORT = await promptInput(
1158 "CADDY_HTTP3_MAPPED_PORT",
1159 "Caddy HTTP3 mapped port:",
1160 "443",
1161 validatePort,
1162 );
1163 answers.CADDY_TALAWA_API_DOMAIN_NAME = await promptInput(
1164 "CADDY_TALAWA_API_DOMAIN_NAME",
1165 "Caddy Talawa API domain name:",
1166 "localhost",
1167 );
1168 answers.CADDY_TALAWA_API_EMAIL = await promptInput(
1169 "CADDY_TALAWA_API_EMAIL",
1170 "Caddy Talawa API email:",
1171 "talawa@email.com",
1172 validateEmail,
1173 );
1174 answers.CADDY_TALAWA_API_HOST = await promptInput(
1175 "CADDY_TALAWA_API_HOST",
1176 "Caddy Talawa API host:",
1177 "api",
1178 );
1179 answers.CADDY_TALAWA_API_PORT = await promptInput(
1180 "CADDY_TALAWA_API_PORT",
1181 "Caddy Talawa API port:",
1182 "4000",
1183 validatePort,
1184 );
1185 } catch (err) {
1186 await handlePromptError(err);
1187 }
1188 return answers;
1189}
1190
1191export async function setup(): Promise<SetupAnswers> {
1192 // Reset state variables at the start of each setup call

Callers 2

caddySetup.test.tsFile · 0.90
setupFunction · 0.85

Calls 2

promptInputFunction · 0.90
handlePromptErrorFunction · 0.85

Tested by

no test coverage detected