aboutsummaryrefslogtreecommitdiff
path: root/routes/api/npmregistry.ts
blob: 366e3bfca829c68b113ef4435ee4021d0cdca000 (plain)
1
2
3
4
5
6
7
8
9
import { Handlers } from "$fresh/server.ts";

export const handler: Handlers<any, { data: string }> = {
  async GET(_req, ctx) {
    const registryResponse = await fetch('https://registry.npmjs.org/@angular/core');
    const data = await registryResponse.json();
    return Response.json({data});
  },
};