🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@stricjs/router

Package Overview
Dependencies
Maintainers
2
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stricjs/router

A minimal, heavily-optimized router for Stric

latest
Source
npmnpm
Version
5.0.6
Version published
Weekly downloads
135
200%
Maintainers
2
Weekly downloads
 
Created
Source

An minimal, heavily-optimized router for Stric.

import { Router, macro } from '@stricjs/router';

// Create a router and serve using Bun
export default new Router()
  // Handle GET request to `/`
  .get('/', macro('Hi'))
  // Handle POST request to `/json`
  .post('/json', ctx => ctx.data, { body: 'json', wrap: 'json' })
  // Return 90 for requests to `/id/90` for instance
  .get('/id/:id', ctx => ctx.params.id, { wrap: true })
  // Use the default 404 handler
  .use(404);

See the docs for more details.

Keywords

stric

FAQs

Package last updated on 23 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts