Skip to main content

Orion: A New Horizon in Server and API Creation

This package works with DenoIt is unknown whether this package works with Bun, Cloudflare Workers, Node.js, Browsers
JSR Score
94%
Published
3 weeks ago (0.1.1)

#server

import Orion from "@orion/orion";

function hello_world(name: string) {
  console.log("Hello " + name + " I am Handler Function");
  return Response.json({ name: "Riasat" });
}

const app = new Orion();
app.handlers = { hello_world };

app.start(3000);

#client

import OrionServer from "@orion/client";

const server = new OrionServer("http://localhost:3000");
const app = server.getApp();

const response = await app.hello_world("Riasat");
console.log(await response);

Add Package

deno add @orion/orion

Import symbol

import * as mod from "@orion/orion";

Add Package

npx jsr add @orion/orion

Import symbol

import * as mod from "@orion/orion";

Add Package

yarn dlx jsr add @orion/orion

Import symbol

import * as mod from "@orion/orion";

Add Package

pnpm dlx jsr add @orion/orion

Import symbol

import * as mod from "@orion/orion";

Add Package

bunx jsr add @orion/orion

Import symbol

import * as mod from "@orion/orion";