@@ -71,6 +71,33 @@ See the
7171[ custom domain migration tutorial] ( /examples/migrate_custom_domain_tutorial/ )
7272for a step-by-step walkthrough.
7373
74+ ## HTTP server API
75+
76+ Deploy Classic supported the ` serve() ` function from the ` deno.land/std ` HTTP
77+ module (e.g. ` https://deno.land/std@0.170.0/http/server.ts ` ). The new Deploy
78+ does ** not** support this legacy ` serve() ` function.
79+
80+ Update your code to use the built-in
81+ [ ` Deno.serve() ` ] ( https://docs.deno.com/api/deno/~/Deno.serve ) API instead:
82+
83+ ``` diff
84+ - import { serve } from "https://deno.land/std@0.170.0/http/server.ts";
85+ -
86+ - serve(() => new Response("hello, world"));
87+ + Deno.serve(() => new Response("hello, world"));
88+ ```
89+
90+ ` Deno.serve() ` has been the recommended HTTP server API since Deno 1.35 and is
91+ more performant. If your application uses the old standard library ` serve() ` ,
92+ update it before migrating to the new Deploy.
93+
94+ If you deploy code that uses the old ` serve() ` function to the new Deploy, it
95+ will fail with a ** timeout error during the warmup phase** of deployment. If you
96+ encounter this error, check whether your entrypoint or any of your dependencies
97+ is using the standard library ` serve() ` . Some older versions of third-party
98+ libraries may internally depend on the legacy ` serve() ` function — in that case,
99+ upgrade the library to a version that uses ` Deno.serve() ` instead.
100+
74101## Cron jobs
75102
76103The ` Deno.cron() ` API works the same way on the new Deploy. Your existing cron
0 commit comments