Socket
Socket
Sign inDemoInstall

urgot

Package Overview
Dependencies
40
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    urgot

a Node.js web framework


Version published
Weekly downloads
27
Maintainers
1
Created
Weekly downloads
 

Readme

Source

installation

npm i urgot

Hello World

import { Server } from 'urgot'

const server = new Server()
server.use(async (context, next) => {
  context.body = 'Hello World'
  await next()
})
server.listen(5611)

Register middleware

server.use(async (context, next) => {
  const start = Date.now()
  await next()
  const ms = Date.now() - start
  context.setHeader('X-Response-Time', `${ms}ms`)
  context.body = 'Hello World'
})

Call next to execute after other middleware executes

npx urgot dev

Keywords

FAQs

Last updated on 24 Nov 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc