Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-cars-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'directus': patch
---

Updated Vercel runtime to use Node.js 22 for deployments.
4 changes: 2 additions & 2 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createServer } from "http";
import directus from "../directus";
import { createServer } from 'http';
import directus from '../directus';

const server = createServer(directus);

Expand Down
14 changes: 6 additions & 8 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"functions": {
"api/index.js": {
"runtime": "nodejs18.x"
}
},
"routes": [
{ "src": "/(.*)", "dest": "/api/index.js" }
]
"functions": {
"api/index.js": {
"runtime": "nodejs22.x"
}
},
"routes": [{ "src": "/(.*)", "dest": "/api/index.js" }]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved readability and easier future modifications, it's generally better to format arrays in JSON files across multiple lines, even if they only contain a single element. This makes it simpler to add or change routes later and makes version control diffs cleaner. While this may be the result of an automatic formatter, I'd recommend keeping the multi-line structure for this routes configuration.

	"routes": [
		{ "src": "/(.*)", "dest": "/api/index.js" }
	]

}