phase 0 & 1 ✅, onto the next logic
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
import { Hono } from "hono";
|
||||
|
||||
const mobileRouter = new Hono().get("/", async (c) => {
|
||||
return c.json({ message: "" });
|
||||
});
|
||||
export const mobileRouter = new Hono()
|
||||
.put("/ping", async (c) => {
|
||||
return c.json({ data: "" });
|
||||
})
|
||||
.put("/sms/sync", async (c) => {
|
||||
return c.json({ data: "" });
|
||||
})
|
||||
.put("/media/sync", async (c) => {
|
||||
return c.json({ data: "" });
|
||||
})
|
||||
.post("/register", async (c) => {
|
||||
return c.json({ data: "" });
|
||||
});
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
import { mobileRouter } from "./domains/mobile/router.js";
|
||||
import { serve } from "@hono/node-server";
|
||||
import { Hono } from "hono";
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.get("/", (c) => {
|
||||
return c.text("Hello Hono!");
|
||||
app.get("/health", (c) => {
|
||||
return c.json({ ok: true });
|
||||
});
|
||||
|
||||
app.get("/ping", (c) => {
|
||||
return c.text("pong");
|
||||
});
|
||||
|
||||
app.route("/api/v1/mobile", mobileRouter);
|
||||
|
||||
serve(
|
||||
{
|
||||
fetch: app.fetch,
|
||||
|
||||
Reference in New Issue
Block a user