npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@smplcty/dev-backend

v0.2.0

Published

Local Lambda dev server — reads a routes config, loads .env, serves Lambda handlers over HTTP with API Gateway v2 event translation.

Readme

@smplcty/dev-backend

Local Lambda dev server. Reads a routes config, loads env vars, and serves Lambda handlers over HTTP with API Gateway v2 event translation.

Install

pnpm dlx @smplcty/dev-backend

Or as a dev dependency:

pnpm add -D @smplcty/dev-backend

Usage

dev-backend [config-path]

Default config path is backend.routes.json in the current directory.

Config

backend.routes.json — committed to your frontend repo:

{
  "port": 4000,
  "envFile": ".env.backend",
  "routes": {
    "/graphql": "../handle-graphql/dist/index.js",
    "/sign-in": {
      "handler": "../../mabulu-inc/sign-in/dist/index.js",
      "envFile": ".env.sign-in"
    },
    "/sign-in/verify": {
      "handler": "../../mabulu-inc/sign-in-verify/dist/index.js",
      "envFile": ".env.sign-in"
    },
    "/ai-insights": "../handle-ai-insights/dist/index.js"
  }
}

Route formats

String — just a handler path. Uses the base envFile:

"/graphql": "../handle-graphql/dist/index.js"

Object — handler path plus a per-route env file override:

"/sign-in": {
  "handler": "../../mabulu-inc/sign-in/dist/index.js",
  "envFile": ".env.sign-in"
}

Per-route env files override the base env file's values for that handler only. This solves the case where two handlers need different DATABASE_URL values (e.g. graphql vs sign-in connect to different databases).

All paths are resolved relative to the config file's location.

Env files

.env.backend — shared variables (gitignored):

DATABASE_URL=postgresql://...
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_VERIFY_SERVICE_SID=VA...
LOG_LEVEL=debug

.env.sign-in — overrides for sign-in handlers (gitignored):

DATABASE_URL=postgresql://...different-db

Env files use standard KEY=VALUE format. Comments (#) and blank lines are skipped. Surrounding quotes are stripped. Existing env vars are not overridden.

How it works

  1. Loads the base env file into process.env.
  2. For each route, if it has a per-route envFile, temporarily overrides the relevant env vars, imports the handler module (so module-level init like Pool creation uses the right values), then restores the originals.
  3. Starts an HTTP server that translates incoming requests into API Gateway v2 proxy events and calls the matching handler.
  4. CORS headers are set on all responses.

License

MIT