Skip to content
Snippets Groups Projects
Commit 7b9c95a7 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix: don't use frontend for backends of type non-streaming

parent 8ae5cb8b
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,9 @@ for (const templateType of templateTypes) { ...@@ -27,7 +27,9 @@ for (const templateType of templateTypes) {
} }
const appType: AppType = const appType: AppType =
templateFramework === "express" || templateFramework === "fastapi" templateFramework === "express" || templateFramework === "fastapi"
? "--frontend" ? templateType === "simple"
? "--no-frontend" // simple templates don't have frontends
: "--frontend"
: ""; : "";
test(`try create-llama ${templateType} ${templateFramework} ${templateEngine} ${templateUI} ${appType}`, async ({ test(`try create-llama ${templateType} ${templateFramework} ${templateEngine} ${templateUI} ${appType}`, async ({
page, page,
...@@ -46,8 +48,10 @@ for (const templateType of templateTypes) { ...@@ -46,8 +48,10 @@ for (const templateType of templateTypes) {
const cps = await runApp(cwd, name, appType, port); const cps = await runApp(cwd, name, appType, port);
// test frontend // test frontend
await page.goto(`http://localhost:${port}`); if (appType !== "--no-frontend") {
await expect(page.getByText("Built by LlamaIndex")).toBeVisible(); await page.goto(`http://localhost:${port}`);
await expect(page.getByText("Built by LlamaIndex")).toBeVisible();
}
// TODO: test backend using curl (would need OpenAI key) // TODO: test backend using curl (would need OpenAI key)
// clean processes // clean processes
cps.forEach((cp) => cp.kill()); cps.forEach((cp) => cp.kill());
......
...@@ -17,11 +17,6 @@ export async function runApp( ...@@ -17,11 +17,6 @@ export async function runApp(
try { try {
switch (appType) { switch (appType) {
case "--no-frontend":
cps.push(
await createProcess("npm run dev", `${cwd}/${name}/backend`, port),
);
break;
case "--frontend": case "--frontend":
cps.push( cps.push(
await createProcess( await createProcess(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment