Code cleanup
This commit is contained in:
@@ -1,13 +1,9 @@
|
|||||||
import { serve } from "bun";
|
import { serve } from "bun";
|
||||||
import index from "./index.html";
|
import index from "./index.html";
|
||||||
import { getPackageDetails } from "./lib/npm_registry";
|
|
||||||
import { fetchAllPackageDetails } from "./services/api";
|
import { fetchAllPackageDetails } from "./services/api";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const server = serve({
|
const server = serve({
|
||||||
routes: {
|
routes: {
|
||||||
// Serve index.html for all unmatched routes.
|
|
||||||
"/*": index,
|
"/*": index,
|
||||||
"/api/analyze": async req => {
|
"/api/analyze": async req => {
|
||||||
const data = await req.json();
|
const data = await req.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user