diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-04-24 15:45:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-24 19:45:49 +0000 |
commit | 2f8825a935bfdf21ca592284556cd86c1552ac8d (patch) | |
tree | 68beddeb5547861212be188f126113e6b1afc1df /cli/tools/jupyter/mod.rs | |
parent | c1bd9503dd0288a3c209ca2724d2a1de9d5d122b (diff) |
feat: Add `deno serve` subcommand (#23511)
By default, `deno serve` will assign port 8000 (like `Deno.serve`).
Users may choose a different port using `--port`.
`deno serve /tmp/file.ts`
`server.ts`:
```ts
export default {
fetch(req) {
return new Response("hello world!\n");
},
};
```
Diffstat (limited to 'cli/tools/jupyter/mod.rs')
-rw-r--r-- | cli/tools/jupyter/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/tools/jupyter/mod.rs b/cli/tools/jupyter/mod.rs index 64c8cd7df..6531b0339 100644 --- a/cli/tools/jupyter/mod.rs +++ b/cli/tools/jupyter/mod.rs @@ -22,6 +22,7 @@ use deno_runtime::deno_io::Stdio; use deno_runtime::deno_io::StdioPipe; use deno_runtime::permissions::Permissions; use deno_runtime::permissions::PermissionsContainer; +use deno_runtime::WorkerExecutionMode; use deno_terminal::colors; use tokio::sync::mpsc; use tokio::sync::mpsc::UnboundedSender; @@ -88,6 +89,7 @@ pub async fn kernel( let mut worker = worker_factory .create_custom_worker( + WorkerExecutionMode::Jupyter, main_module.clone(), permissions, vec![ |