import { serve } from "https://deno.land/std@0.192.0/http/server.ts"; import { ParseResult } from "../../language/types.ts"; import YomikunRAWAPI from "../raw/api.ts"; import { ConnectionProps, ConnectionPropsDefault } from "./props.ts"; interface Endpoint { endpoint: string; }; export default class YomikunRemoteAPIServer extends YomikunRAWAPI { private props: ConnectionProps; constructor(options?: ConnectionProps) { super(); this.props = { ...ConnectionPropsDefault, ...options }; } async parseSentence(input: string) { return await super.parseSentence(input); } async start() { serve((req) => { return new Response("Hello world!"); }, { port: this.props.port }); } async prepare() { await super.prepare(); } }