Skip to content

[Feature request] Option to generate static API #797

@noraj

Description

@noraj

Idea

Add an option to use json-server as a static API generator rather than a API server.

Description

It would be great to have an option (ex: --generate) to transform one or multiples JSON database files into a static JSON API.

static-api-generator is doing that but only YAML to static JSON API and the owner is unresponsive for nearly 1 year.

Why

In some case you have a JSON database and you want a JSON API but you can't use dynamic content, only static. So you need to build a static API server by static web server.

For example if you have a static website generator that is hosted on github pages or gitlab pages, yo ucan only serve static content so there is no way to launch json-server. That's why adding an option for generating the static API output rather than dynamically serving it would help in this case.

How

Looking at static-api-generator for a start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions