NTERAC

About

Nterac is a minimal HTTP API server using Deno.

Usage

Start the server

Init a server in a main.ts:

import { serve } from "module";

serve();

After that the serve function will use the files in the api folder. Remember to replace the module in the import with correct path.

The api folder

The api folder should contain the routes. Routes are simple TypeScript files. An example would be the file api/hello.ts:

export default function (_req: Request) {
  return new Response('Hello World!');
}

Root files are files in the root of a directory. These are not named so we only use .ts as the file name.

Keep in mind

There's a difference between /hello/ and /hello. See root files. This is a hobby project, but planned to maintain and update.

To try it out, clone the repo, start the main.ts file using deno run --allow-all main.ts.