Skip to content

Commit 22d8343

Browse files
update: move src directory into api directory
1 parent 16c5aa5 commit 22d8343

File tree

23 files changed

+5
-4
lines changed

23 files changed

+5
-4
lines changed

index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,9 @@ async function init() {
318318

319319
write("package.json", JSON.stringify(pkg, null, 2) + "\n");
320320
const ext = template.split("-")[1] ? "ts" : "js";
321-
await setupSecret(root, `src/index.${ext}`, secret);
322-
await setupSubdomain(root, `src/DevLayer.js`);
321+
let srcEntry = template.startsWith("vercel") ? "api/src" : "src";
322+
await setupSecret(root, `${srcEntry}/index.${ext}`, secret);
323+
await setupSubdomain(root, `${srcEntry}/DevLayer.js`);
323324
let doneMessage = "";
324325
const cdProjectName = path.relative(cwd, root);
325326
doneMessage += `All done! Execute:\n`;

templates/vercel-ts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Discord.https
22

3-
Vercel’s serverless functions must be placed inside the `api` directory.
3+
Vercel’s serverless functions must be placed inside the api directory, anything outside this directory will be served as a public asset.
44

55
By default, the URL is: `<vercel_url>/api/interactions`
66

File renamed without changes.

0 commit comments

Comments
 (0)