create-scaffauth 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/templates/express/drizzle-mysql/package.json.hbs +2 -2
  2. package/dist/templates/express/drizzle-postgres/package.json.hbs +2 -2
  3. package/dist/templates/express/drizzle-sqlite/package.json.hbs +3 -3
  4. package/dist/templates/express/kysely-mysql/package.json.hbs +1 -1
  5. package/dist/templates/express/kysely-postgres/package.json.hbs +1 -1
  6. package/dist/templates/express/kysely-sqlite/package.json.hbs +2 -2
  7. package/dist/templates/express/prisma-mysql/package.json.hbs +1 -1
  8. package/dist/templates/express/prisma-postgres/package.json.hbs +1 -1
  9. package/dist/templates/express/prisma-sqlite/.env.example.hbs +1 -1
  10. package/dist/templates/express/prisma-sqlite/package.json.hbs +1 -1
  11. package/dist/templates/fastify/drizzle-mysql/package.json.hbs +2 -2
  12. package/dist/templates/fastify/drizzle-postgres/package.json.hbs +2 -2
  13. package/dist/templates/fastify/drizzle-sqlite/package.json.hbs +3 -3
  14. package/dist/templates/fastify/kysely-mysql/package.json.hbs +1 -1
  15. package/dist/templates/fastify/kysely-postgres/package.json.hbs +1 -1
  16. package/dist/templates/fastify/kysely-sqlite/package.json.hbs +2 -2
  17. package/dist/templates/fastify/prisma-mysql/package.json.hbs +1 -1
  18. package/dist/templates/fastify/prisma-postgres/package.json.hbs +1 -1
  19. package/dist/templates/fastify/prisma-sqlite/.env.example.hbs +1 -1
  20. package/dist/templates/fastify/prisma-sqlite/package.json.hbs +1 -1
  21. package/dist/templates/hono/drizzle-mysql/package.json.hbs +3 -2
  22. package/dist/templates/hono/drizzle-mysql/src/index.ts +6 -6
  23. package/dist/templates/hono/drizzle-postgres/package.json.hbs +3 -2
  24. package/dist/templates/hono/drizzle-postgres/src/index.ts +6 -6
  25. package/dist/templates/hono/drizzle-sqlite/package.json.hbs +5 -4
  26. package/dist/templates/hono/drizzle-sqlite/src/index.ts +6 -6
  27. package/dist/templates/hono/kysely-mysql/package.json.hbs +2 -1
  28. package/dist/templates/hono/kysely-mysql/src/index.ts +6 -6
  29. package/dist/templates/hono/kysely-postgres/package.json.hbs +2 -1
  30. package/dist/templates/hono/kysely-postgres/src/index.ts +6 -6
  31. package/dist/templates/hono/kysely-sqlite/package.json.hbs +3 -2
  32. package/dist/templates/hono/kysely-sqlite/src/index.ts +6 -6
  33. package/dist/templates/hono/prisma-mysql/package.json.hbs +3 -2
  34. package/dist/templates/hono/prisma-mysql/src/index.ts +6 -6
  35. package/dist/templates/hono/prisma-postgres/package.json.hbs +3 -2
  36. package/dist/templates/hono/prisma-postgres/src/index.ts +6 -6
  37. package/dist/templates/hono/prisma-sqlite/.env.example.hbs +1 -1
  38. package/dist/templates/hono/prisma-sqlite/package.json.hbs +3 -2
  39. package/dist/templates/hono/prisma-sqlite/src/index.ts +6 -6
  40. package/package.json +1 -1
@@ -13,7 +13,7 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
16
+ "better-auth": "1.2.0",
17
17
  "cors": "^2.8.5",
18
18
  "drizzle-orm": "^0.38.0",
19
19
  "express": "^5.0.0",
@@ -27,7 +27,7 @@
27
27
  "@types/cors": "^2.8.17",
28
28
  "@types/express": "^5.0.0",
29
29
  "@types/node": "^22.13.0",
30
- "drizzle-kit": "^0.30.0",
30
+ "drizzle-kit": "^0.31.8",
31
31
  "tsx": "^4.19.0",
32
32
  "typescript": "^5.7.0"
33
33
  {{#if (eq emailProvider "smtp")}},
@@ -13,7 +13,7 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
16
+ "better-auth": "1.2.0",
17
17
  "cors": "^2.8.5",
18
18
  "drizzle-orm": "^0.38.0",
19
19
  "express": "^5.0.0",
@@ -28,7 +28,7 @@
28
28
  "@types/express": "^5.0.0",
29
29
  "@types/node": "^22.13.0",
30
30
  "@types/pg": "^8.11.0",
31
- "drizzle-kit": "^0.30.0",
31
+ "drizzle-kit": "^0.31.8",
32
32
  "tsx": "^4.19.0",
33
33
  "typescript": "^5.7.0"
34
34
  {{#if (eq emailProvider "smtp")}},
@@ -13,8 +13,8 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
17
- "better-sqlite3": "^11.7.0",
16
+ "better-auth": "1.2.0",
17
+ "better-sqlite3": "^12.0.0",
18
18
  "cors": "^2.8.5",
19
19
  "drizzle-orm": "^0.38.0",
20
20
  "express": "^5.0.0"
@@ -28,7 +28,7 @@
28
28
  "@types/cors": "^2.8.17",
29
29
  "@types/express": "^5.0.0",
30
30
  "@types/node": "^22.13.0",
31
- "drizzle-kit": "^0.30.0",
31
+ "drizzle-kit": "^0.31.8",
32
32
  "tsx": "^4.19.0",
33
33
  "typescript": "^5.7.0"
34
34
  {{#if (eq emailProvider "smtp")}},
@@ -10,7 +10,7 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
13
+ "better-auth": "1.2.0",
14
14
  "cors": "^2.8.5",
15
15
  "express": "^5.0.0",
16
16
  "kysely": "^0.27.0",
@@ -10,7 +10,7 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
13
+ "better-auth": "1.2.0",
14
14
  "cors": "^2.8.5",
15
15
  "express": "^5.0.0",
16
16
  "kysely": "^0.27.0",
@@ -10,8 +10,8 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
14
- "better-sqlite3": "^11.7.0",
13
+ "better-auth": "1.2.0",
14
+ "better-sqlite3": "^12.0.0",
15
15
  "cors": "^2.8.5",
16
16
  "express": "^5.0.0",
17
17
  "kysely": "^0.27.0"
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
17
+ "better-auth": "1.2.0",
18
18
  "cors": "^2.8.5",
19
19
  "express": "^5.0.0"
20
20
  {{#if (eq emailProvider "resend")}},
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
17
+ "better-auth": "1.2.0",
18
18
  "cors": "^2.8.5",
19
19
  "express": "^5.0.0"
20
20
  {{#if (eq emailProvider "resend")}},
@@ -1,5 +1,5 @@
1
1
  # Database
2
- DATABASE_URL=sqlite.db
2
+ DATABASE_URL=file:./dev.db
3
3
 
4
4
  # Better Auth
5
5
  BETTER_AUTH_SECRET={{authSecret}}
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
17
+ "better-auth": "1.2.0",
18
18
  "cors": "^2.8.5",
19
19
  "express": "^5.0.0"
20
20
  {{#if (eq emailProvider "resend")}},
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
- "better-auth": "^1.2.0",
17
+ "better-auth": "1.2.0",
18
18
  "drizzle-orm": "^0.38.0",
19
19
  "fastify": "^5.2.0",
20
20
  "mysql2": "^3.11.0"
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.13.0",
28
- "drizzle-kit": "^0.30.0",
28
+ "drizzle-kit": "^0.31.8",
29
29
  "tsx": "^4.19.0",
30
30
  "typescript": "^5.7.0"
31
31
  {{#if (eq emailProvider "smtp")}},
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
- "better-auth": "^1.2.0",
17
+ "better-auth": "1.2.0",
18
18
  "drizzle-orm": "^0.38.0",
19
19
  "fastify": "^5.2.0",
20
20
  "pg": "^8.13.0"
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.13.0",
28
28
  "@types/pg": "^8.11.0",
29
- "drizzle-kit": "^0.30.0",
29
+ "drizzle-kit": "^0.31.8",
30
30
  "tsx": "^4.19.0",
31
31
  "typescript": "^5.7.0"
32
32
  {{#if (eq emailProvider "smtp")}},
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
- "better-auth": "^1.2.0",
18
- "better-sqlite3": "^11.7.0",
17
+ "better-auth": "1.2.0",
18
+ "better-sqlite3": "^12.0.0",
19
19
  "drizzle-orm": "^0.38.0",
20
20
  "fastify": "^5.2.0"
21
21
  {{#if (eq emailProvider "resend")}},
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "@types/better-sqlite3": "^7.6.0",
28
28
  "@types/node": "^22.13.0",
29
- "drizzle-kit": "^0.30.0",
29
+ "drizzle-kit": "^0.31.8",
30
30
  "tsx": "^4.19.0",
31
31
  "typescript": "^5.7.0"
32
32
  {{#if (eq emailProvider "smtp")}},
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@fastify/cors": "^10.0.0",
14
- "better-auth": "^1.2.0",
14
+ "better-auth": "1.2.0",
15
15
  "fastify": "^5.2.0",
16
16
  "kysely": "^0.27.0",
17
17
  "mysql2": "^3.11.0"
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@fastify/cors": "^10.0.0",
14
- "better-auth": "^1.2.0",
14
+ "better-auth": "1.2.0",
15
15
  "fastify": "^5.2.0",
16
16
  "kysely": "^0.27.0",
17
17
  "pg": "^8.13.0"
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@fastify/cors": "^10.0.0",
14
- "better-auth": "^1.2.0",
15
- "better-sqlite3": "^11.7.0",
14
+ "better-auth": "1.2.0",
15
+ "better-sqlite3": "^12.0.0",
16
16
  "fastify": "^5.2.0",
17
17
  "kysely": "^0.27.0"
18
18
  {{#if (eq emailProvider "resend")}},
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
17
  "@prisma/client": "^6.3.0",
18
- "better-auth": "^1.2.0",
18
+ "better-auth": "1.2.0",
19
19
  "fastify": "^5.2.0"
20
20
  {{#if (eq emailProvider "resend")}},
21
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
17
  "@prisma/client": "^6.3.0",
18
- "better-auth": "^1.2.0",
18
+ "better-auth": "1.2.0",
19
19
  "fastify": "^5.2.0"
20
20
  {{#if (eq emailProvider "resend")}},
21
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -1,5 +1,5 @@
1
1
  # Database
2
- DATABASE_URL=sqlite.db
2
+ DATABASE_URL=file:./dev.db
3
3
 
4
4
  # Better Auth
5
5
  BETTER_AUTH_SECRET={{authSecret}}
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@fastify/cors": "^10.0.0",
17
17
  "@prisma/client": "^6.3.0",
18
- "better-auth": "^1.2.0",
18
+ "better-auth": "1.2.0",
19
19
  "fastify": "^5.2.0"
20
20
  {{#if (eq emailProvider "resend")}},
21
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -13,9 +13,10 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
16
+ "better-auth": "1.2.0",
17
17
  "drizzle-orm": "^0.38.0",
18
18
  "hono": "^4.7.0",
19
+ "@hono/node-server": "^1.13.8",
19
20
  "mysql2": "^3.11.0"
20
21
  {{#if (eq emailProvider "resend")}},
21
22
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -24,7 +25,7 @@
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/node": "^22.13.0",
27
- "drizzle-kit": "^0.30.0",
28
+ "drizzle-kit": "^0.31.8",
28
29
  "tsx": "^4.19.0",
29
30
  "typescript": "^5.7.0"
30
31
  {{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -13,9 +13,10 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
16
+ "better-auth": "1.2.0",
17
17
  "drizzle-orm": "^0.38.0",
18
18
  "hono": "^4.7.0",
19
+ "@hono/node-server": "^1.13.8",
19
20
  "pg": "^8.13.0"
20
21
  {{#if (eq emailProvider "resend")}},
21
22
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -25,7 +26,7 @@
25
26
  "devDependencies": {
26
27
  "@types/node": "^22.13.0",
27
28
  "@types/pg": "^8.11.0",
28
- "drizzle-kit": "^0.30.0",
29
+ "drizzle-kit": "^0.31.8",
29
30
  "tsx": "^4.19.0",
30
31
  "typescript": "^5.7.0"
31
32
  {{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -13,10 +13,11 @@
13
13
  "db:studio": "drizzle-kit studio"
14
14
  },
15
15
  "dependencies": {
16
- "better-auth": "^1.2.0",
17
- "better-sqlite3": "^11.7.0",
16
+ "better-auth": "1.2.0",
17
+ "better-sqlite3": "^12.0.0",
18
18
  "drizzle-orm": "^0.38.0",
19
- "hono": "^4.7.0"
19
+ "hono": "^4.7.0",
20
+ "@hono/node-server": "^1.13.8"
20
21
  {{#if (eq emailProvider "resend")}},
21
22
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
22
23
  "@sendgrid/mail": "^8.1.0"{{/if}}{{#if (eq emailProvider "smtp")}},
@@ -25,7 +26,7 @@
25
26
  "devDependencies": {
26
27
  "@types/better-sqlite3": "^7.6.0",
27
28
  "@types/node": "^22.13.0",
28
- "drizzle-kit": "^0.30.0",
29
+ "drizzle-kit": "^0.31.8",
29
30
  "tsx": "^4.19.0",
30
31
  "typescript": "^5.7.0"
31
32
  {{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -10,8 +10,9 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
13
+ "better-auth": "1.2.0",
14
14
  "hono": "^4.7.0",
15
+ "@hono/node-server": "^1.13.8",
15
16
  "kysely": "^0.27.0",
16
17
  "mysql2": "^3.11.0"
17
18
  {{#if (eq emailProvider "resend")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -10,8 +10,9 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
13
+ "better-auth": "1.2.0",
14
14
  "hono": "^4.7.0",
15
+ "@hono/node-server": "^1.13.8",
15
16
  "kysely": "^0.27.0",
16
17
  "pg": "^8.13.0"
17
18
  {{#if (eq emailProvider "resend")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -10,9 +10,10 @@
10
10
  "db:migrate": "tsx db/migrate.ts"
11
11
  },
12
12
  "dependencies": {
13
- "better-auth": "^1.2.0",
14
- "better-sqlite3": "^11.7.0",
13
+ "better-auth": "1.2.0",
14
+ "better-sqlite3": "^12.0.0",
15
15
  "hono": "^4.7.0",
16
+ "@hono/node-server": "^1.13.8",
16
17
  "kysely": "^0.27.0"
17
18
  {{#if (eq emailProvider "resend")}},
18
19
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -14,8 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
18
- "hono": "^4.7.0"
17
+ "better-auth": "1.2.0",
18
+ "hono": "^4.7.0",
19
+ "@hono/node-server": "^1.13.8"
19
20
  {{#if (eq emailProvider "resend")}},
20
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
21
22
  "@sendgrid/mail": "^8.1.0"{{/if}}{{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -14,8 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
18
- "hono": "^4.7.0"
17
+ "better-auth": "1.2.0",
18
+ "hono": "^4.7.0",
19
+ "@hono/node-server": "^1.13.8"
19
20
  {{#if (eq emailProvider "resend")}},
20
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
21
22
  "@sendgrid/mail": "^8.1.0"{{/if}}{{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
@@ -1,5 +1,5 @@
1
1
  # Database
2
- DATABASE_URL=sqlite.db
2
+ DATABASE_URL=file:./dev.db
3
3
 
4
4
  # Better Auth
5
5
  BETTER_AUTH_SECRET={{authSecret}}
@@ -14,8 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@prisma/client": "^6.3.0",
17
- "better-auth": "^1.2.0",
18
- "hono": "^4.7.0"
17
+ "better-auth": "1.2.0",
18
+ "hono": "^4.7.0",
19
+ "@hono/node-server": "^1.13.8"
19
20
  {{#if (eq emailProvider "resend")}},
20
21
  "resend": "^4.0.0"{{/if}}{{#if (eq emailProvider "sendgrid")}},
21
22
  "@sendgrid/mail": "^8.1.0"{{/if}}{{#if (eq emailProvider "smtp")}},
@@ -1,3 +1,4 @@
1
+ import { serve } from "@hono/node-server";
1
2
  import { Hono } from "hono";
2
3
  import { cors } from "hono/cors";
3
4
  import { logger } from "hono/logger";
@@ -25,11 +26,10 @@ app.get("/", (c) => {
25
26
  return c.json({ status: "ok", message: "Auth backend is running" });
26
27
  });
27
28
 
28
- // Start server
29
29
  const port = Number(process.env.PORT) || 3000;
30
- console.log(`Server running on http://localhost:${port}`);
31
-
32
- export default {
33
- port,
30
+ serve({
34
31
  fetch: app.fetch,
35
- };
32
+ port,
33
+ });
34
+
35
+ console.log(`Server running on http://localhost:${port}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-scaffauth",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Scaffold production-ready Better Auth backends",
5
5
  "type": "module",
6
6
  "bin": {