English | 简体中文
Deno-based service engine for fast start of server-side development
deno install -Af https://deno.land/x/trypoxylus/bin/trypoxylus.ts
mkdir demo
vi config.ts
It reads as follows.
export default {
// Port number for service startup
port: 9000,
};
mkdir controllers && cd controllers && vi hello.ts
It reads as follows.
import { Context } from "https://deno.land/x/oak/mod.ts";
export const controller = {
router: "/hello",
get: async (ctx: Context) => {
ctx.response.body = "Hello world";
},
};
To the parent of the project directory
trypoxylus start demo
Then go to http://localhost:9000/hello
See the demo
directory for details on using the database and middleware.
Detailed configuration example demo/config-example.ts
file