mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Feature: Fastify Implementation ⚡ (#274)
Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
This commit is contained in:
@@ -74,6 +74,9 @@ export const dependencyVersionMap = {
|
||||
"@types/express": "^5.0.1",
|
||||
"@types/cors": "^2.8.17",
|
||||
|
||||
fastify: "^5.3.3",
|
||||
"@fastify/cors": "^11.0.1",
|
||||
|
||||
turbo: "^2.4.2",
|
||||
|
||||
ai: "^4.3.16",
|
||||
|
||||
@@ -42,6 +42,12 @@ export async function setupBackendDependencies(
|
||||
dependencies.push("express", "cors");
|
||||
devDependencies.push("@types/express", "@types/cors");
|
||||
|
||||
if (runtime === "node") {
|
||||
devDependencies.push("tsx", "@types/node");
|
||||
}
|
||||
} else if (framework === "fastify") {
|
||||
dependencies.push("fastify", "@fastify/cors");
|
||||
|
||||
if (runtime === "node") {
|
||||
devDependencies.push("tsx", "@types/node");
|
||||
}
|
||||
|
||||
@@ -268,6 +268,8 @@ function generateFeaturesList(
|
||||
addonsList.push("- **Hono** - Lightweight, performant server framework");
|
||||
} else if (backend === "express") {
|
||||
addonsList.push("- **Express** - Fast, unopinionated web framework");
|
||||
} else if (backend === "fastify") {
|
||||
addonsList.push("- **Fastify** - Fast, low-overhead web framework");
|
||||
} else if (backend === "elysia") {
|
||||
addonsList.push("- **Elysia** - Type-safe, high-performance framework");
|
||||
} else if (backend === "next") {
|
||||
|
||||
@@ -140,7 +140,15 @@ async function main() {
|
||||
.option("backend", {
|
||||
type: "string",
|
||||
describe: "Backend framework",
|
||||
choices: ["hono", "express", "next", "elysia", "convex", "none"],
|
||||
choices: [
|
||||
"hono",
|
||||
"express",
|
||||
"fastify",
|
||||
"next",
|
||||
"elysia",
|
||||
"convex",
|
||||
"none",
|
||||
],
|
||||
})
|
||||
.option("runtime", {
|
||||
type: "string",
|
||||
|
||||
@@ -33,6 +33,11 @@ export async function getBackendFrameworkChoice(
|
||||
label: "Express",
|
||||
hint: "Fast, unopinionated, minimalist web framework for Node.js",
|
||||
},
|
||||
{
|
||||
value: "fastify" as const,
|
||||
label: "Fastify",
|
||||
hint: "Fast, low-overhead web framework for Node.js",
|
||||
},
|
||||
{
|
||||
value: "elysia" as const,
|
||||
label: "Elysia",
|
||||
|
||||
@@ -17,6 +17,7 @@ export type ProjectAddons =
|
||||
export type ProjectBackend =
|
||||
| "hono"
|
||||
| "express"
|
||||
| "fastify"
|
||||
| "next"
|
||||
| "elysia"
|
||||
| "convex"
|
||||
|
||||
Reference in New Issue
Block a user