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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@simoneldevig/json-gui

v0.3.10

Published

A GUI for easily creating mock api's via a UI with json-server

Downloads

13

Readme

Create a REST API with a GUI

  • ⚡️ Create endpoints
  • ♻️ Create reusable models
  • ➕ Add property types (string, number, boolean, object, array)
  • 🦄 Faker.js integration for quickly adding random data
  • 🔌 Quicktype.io integration for converting models and endpoints to C# and TypeScript (properly more to come)

JSON GUI is a tool for making even easier mock up a full REST API for your project. It's a GUI for json-server so you don't have to write JSON or generator functions to set up your API.

Even though it's made for json-server, it can also be used as a JSON generator.

How it looks

Getting started

Install using npm

npm i @simoneldevig/json-gui

Run it with npx

npx json-gui 

Run it with npm scripts

Add "json-gui": "json-gui to scripts property in package.json and do

npm run json-gui

Configuration

It's possible to configure the json-server implementation via a config file.

To configure the settings, simply create a file called json-server.config.js. All json-server CLI configurations are supported. The default config looks like this:

module.exports = {
  baseDir: 'json-gui',                  // Directory where json-gui files are located
  port: 5000,                           // Set port  
  host: 'localhost',                    // Set host
  watch: true,                          // Watch for changes to db.json
  routes: '',                           // Path to custom routes file
  delay: 0,                             // Add delay to responses (ms)
  logger: true,                         // Show logs in console
  noCors: false,                        // Disable Cross-Origin Resource Sharing  
  readOnly: true,                       // Allow only GET requests (json-gui will overwrite posted data on generate)
  snapshotsDir: 'json-gui/snapshots',   // Set snapshots directory 
  foreignKeySuffix: 'Id',               // Set foreign key suffix, (e.g. _id as in post_id)
  id: 'id',                             // Set database id property (e.g. _id)
  middlewares: []                       // Relative paths to middleware files 
};

Future stuff (up for grabs)

Contribution

See Contributing Guide.

License

Copyright © 2021 Simon Eldevig

All source code is licensed under the Mozilla Public License.