sdfsdfsdfsjxnrss1 match
1// RSS middleware for jxnblk.com
23// import data from "https://blog.jxnblk.com/api/all.json" with { type: "json" };
4import type { Middleware } from "https://esm.town/v/jxnblk/ReactStream";
5
sdfsdfsdfsjxndotcom1 match
11import { rss } from "./rss";
1213import data from "https://blog.jxnblk.com/api/all.json?d4" with { type: "json" };
1415interface Params {
mynewprojectjxnReactStream7 matches
34const useMiddleware = Array.isArray(opts); // for backwards compat
35const options: ReactStreamOptions = !Array.isArray(opts) ? opts : {};
36const { api, getInitialProps } = options;
3738if (typeof document !== "undefined" && module) {
48// DEPRECATED (for backwards compat)
49options.robots && robots(options.robots),
50options.api && deprecatedCustomAPI(options.api),
51options.getInitialProps && deprecatedGetInitiaProps(options.getInitialProps),
52// New custom middleware
127// DEPRECATED
128// DEPRECATE (for backwards compat)
129const deprecatedCustomAPI = (api?: RequestHandler): Middleware => async (req, res, next) => {
130if (!api) return next();
131if (req.method === "GET") return next();
132return api(req);
133};
134const deprecatedGetInitiaProps = (getProps: DataFetcher<any>): Middleware => async (req, res, next) => {
142/** DEPRECATED: Optional text response for robots.txt */
143robots?: string;
144/** DEPRECATED: Optional API request handler for all non-GET methods */
145api?: RequestHandler;
146/** DEPRECATED: data fetcher to set initial props based on request */
147getInitialProps?: DataFetcher<any>;
mynewprojectjxnrss1 match
1// RSS middleware for jxnblk.com
23// import data from "https://blog.jxnblk.com/api/all.json" with { type: "json" };
4import type { Middleware } from "https://esm.town/v/jxnblk/ReactStream";
5
mynewprojectjxndotcom1 match
11import { rss } from "./rss";
1213import data from "https://blog.jxnblk.com/api/all.json?d4" with { type: "json" };
1415interface Params {
1export default async function(req: Request): Promise<Response> {
2const response = await fetch("https://api.thecatapi.com/v1/images/search");
3const [catData] = await response.json();
4return Response.json({ url: catData.url });
yaycatsscholarlyLimeSlug1 match
1export default async function(req: Request): Promise<Response> {
2const response = await fetch("https://api.thecatapi.com/v1/images/search");
3const [catData] = await response.json();
4return Response.json({ url: catData.url });
catsplsworkscholarlyLimeSlug1 match
1export default async function(req: Request): Promise<Response> {
2const response = await fetch("https://api.thecatapi.com/v1/images/search");
3const [catData] = await response.json();
4return Response.json({ url: catData.url });
1export default async function(req: Request): Promise<Response> {
2const response = await fetch("https://api.thecatapi.com/v1/images/search");
3const [catData] = await response.json();
4return Response.json({ url: catData.url });
cattsssscholarlyLimeSlug1 match
1export default async function(req: Request): Promise<Response> {
2const response = await fetch("https://api.thecatapi.com/v1/images/search");
3const [catData] = await response.json();
4return Response.json({ url: catData.url });