Skip to content

Commit

Permalink
fork: add custom env docroot for php built-in server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Alvarez committed Feb 2, 2024
1 parent 9dfad68 commit 9475b4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/launchers/builtin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ import {
transformToAwsResponse,
isDev
} from './helpers';
import { join as pathJoin } from 'path';

let server: ChildProcess;

async function startServer(entrypoint: string): Promise<ChildProcess> {
// Resolve document root and router
const router = entrypoint;
const docroot = getUserDir();
const docroot = pathJoin(getUserDir(), process.env.VERCEL_LARAVEL_DOCROOT ?? '');

console.log(`🐘 Spawning: PHP Built-In Server at ${docroot} (document root) and ${router} (router)`);

Expand Down

0 comments on commit 9475b4c

Please sign in to comment.