mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add json middleware in express
This commit is contained in:
6
.changeset/fine-plants-cough.md
Normal file
6
.changeset/fine-plants-cough.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"create-better-t-stack": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add express.json() middleware to the Express backend template.
|
||||||
|
Rename the TanStack Start frontend package to "web".
|
||||||
@@ -39,6 +39,8 @@ app.use(
|
|||||||
app.all("/api/auth{/*path}", toNodeHandler(auth));
|
app.all("/api/auth{/*path}", toNodeHandler(auth));
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
app.use(express.json())
|
||||||
|
|
||||||
{{#if (eq api "trpc")}}
|
{{#if (eq api "trpc")}}
|
||||||
app.use(
|
app.use(
|
||||||
"/trpc",
|
"/trpc",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "tanstack-start",
|
"name": "web",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user