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 🙏

© 2025 – Pkg Stats / Ryan Hefner

teralang

v1.0.6

Published

A lightweight mock API server and domain-specific language for creating mock backends using .tera files

Downloads

7

Readme

TeraLang

npm dependents Downloads NPM Version

TeraLang is a lightweight, easy-to-use language for quickly creating mock APIs and mock backends for frontend development. It allows you to define routes, responses, and mock data with minimal setup, helping you simulate real API interactions without the need for a full backend server.

Features

  • Simple Syntax: Define mock routes using an intuitive and easy-to-understand syntax.
  • Route Definition: Create mock API routes with different HTTP methods (GET, POST, etc.).
  • Flexible Mock Data: Return static or dynamic mock data for each route.
  • Importable Files: Reuse TeraLang files by importing them into other mock backends.
  • Customizable Responses: Easily define responses for specific routes, including JSON-like data.

Installation

You can install TeraLang via npm:

npm install teralang

Usage

Basic Example

Create a .tera file to define routes for your mock API. For example, create a file called mock-api.tera:

route "/ping" GET: {
  status: 200 // optional
  json: {
    message: "pong"
  }
}

To start the server, run:

npx teralang serve mock-api.tera --port 4000

Importing Other Tera Files

To keep your project organized and reduce clutter, you can import other .tera files into your main file. This allows you to split different parts of your mock API into separate files and manage them more easily.

For example, if you have a file called app.tera and want to include it in your main file, you can import it like this:

import "./app.tera"

Note:

Imported .tera files follow the exact same format as your main .tera file—there's no special syntax or setup required.

You can also chain imports inside those files. For example, app.tera can itself import more .tera files:

import "./users.tera"
import "./posts.tera"

What is coming soon?

  • [ ] Database integration support
  • [ ] Live reload on file changes
  • [ ] VS Code extension for syntax highlighting