akumaruь
akumaruь
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
import { Application, Router } from "https://deno.land/x/oak/mod.ts";

const router = new Router();
router
.get("/", (context) => {
context.response.body = "Hello world!";
})

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({ port: 8000 }
import { Application, Router } from "https://deno.land/x/oak/mod.ts";

const router = new Router();
router
.get("/", (context) => {
context.response.body = "Hello world!";
})

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({ port: 8000 }
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
ctx.response.body = "Hello World!";
});

await app.listen({ port: 8000 });
import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
ctx.response.body = "Hello World!";
});

await app.listen({ port: 8000 });
from official docs
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
i don't think it's a valid code
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
type Enable instead of cache
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
sorry for offtopic quesiton, but what did you use for recordin it?
26 replies
DDeno
Created by ivandpf on 2/21/2024 in #help
Starting project errors
try enabling deno for current workspace
26 replies
DDeno
Created by Jonas on 2/10/2024 in #help
Compile to exe
check if it works fine with deno run
6 replies
DDeno
Created by akumaruь on 10/19/2023 in #help
Having a problem while getting a file from form. Oak.
I'm sending the file with:
<form action="/" method="post" id="media_form">
<h1>Media Content</h1>
<input type="file" name="file" id="file">
<textarea type="text" name="text" id="text" placeholder="Text content."></textarea>
<br>
<input type="submit" value="Publish.">
</form>
<form action="/" method="post" id="media_form">
<h1>Media Content</h1>
<input type="file" name="file" id="file">
<textarea type="text" name="text" id="text" placeholder="Text content."></textarea>
<br>
<input type="submit" value="Publish.">
</form>
3 replies
DDeno
Created by alexp95 on 10/17/2023 in #help
How do I have a subrouter in Oak?
Hi there. I've used Express before, But first time seeing something like subrouter, can you provide a link, please?
5 replies