Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xxskyy/microbundle

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xxskyy/microbundle

Includes also helpers like ReCaptcha validator, env variables or pre-configured shield rules for trivial permission management. Works great with cloudflare.

  • 1.3.33
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
85
increased by63.46%
Maintainers
1
Weekly downloads
 
Created
Source

Personal bundle to create GraphQL Microservices and Gateways in matter of minutes

Includes also helpers like ReCaptcha validator, env variables or pre-configured shield rules for trivial permission management. Works great with cloudflare.

Stack:

  • Typescript
  • Fastify
  • Mercurius
  • GraphQL Shield
  • JWT Authentication
  • MongoDB Client
  • Rate Limiter
  • Redis Client
  • Fastify Cors

Features:

  • Generated gateway config from YAML file
  • ReCaptcha V2 & V3 validator
  • Schema -> TS Types generation
  • Automatic schema + resolvers merge
  • Executable service sdl schema
  • JWT Verification
  • Switchable logger
  • Queries/Mutations over Websocket
  • Restricting Query/Mutation only over HTTP or Websocket
  • Flexible rate limiting for HTTP and Websocket requests
  • Custom types for maximum Typescript support
  • Automatic headers rewrite with Cloudflare support
  • Every setting ENV controlled

Default ENV settings

export const PRODUCTION = process.env.NODE_ENV === "production"
export const TEST = process.env.NODE_ENV === "test"
export const LOGGER = +process.env.LOGGER === 1

export const NAME = process.env.APP_NAME || null
export const PORT = +process.env.APP_PORT || 3000
export const HOST = process.env.APP_HOST || "localhost"

export const JWT_SECRET = process.env.JWT_SECRET

export const MONGO_HOST = process.env.MONGO_HOST || null
export const MONGO_DBNAME = process.env.MONGO_DBNAME || null

export const REDIS_HOST = process.env.REDIS_HOST || null
export const REDIS_PORT = process.env.REDIS_PORT || null
export const REDIS_PASSWORD = process.env.REDIS_PASSWORD || null
export const REDIS_DB = process.env.REDIS_DB || 1

export const RECAPTCHA_KEY_V2 = process.env.RECAPTCHA_KEY_V2 || null
export const RECAPTCHA_KEY_V3 = process.env.RECAPTCHA_KEY_V3 || null

export const CORS_ORIGIN = process.env.CORS_ORIGIN || "*"

export const RATE_LIMIT_MAX = +process.env.RATE_LIMIT_MAX || 200
export const RATE_LIMIT_TIME_WINDOW =
  process.env.RATE_LIMIT_TIME_WINDOW || "1 minute"

export const DISABLE_CODEGEN = +process.env.DISABLE_CODEGEN === 1

FAQs

Package last updated on 19 Jul 2022

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc