Ask HN: How can I make a static API? 3 points by vatsadev 5y ago ↗ HN how can i make a static api, like pokeapi.co
[–] abdusco 5y ago ↗ Check out datasette. It helps you explore a SQLite database, and exposes an JSON API with almost no configuration. It has a GraphQL plugin if that's your thing.All you have to do is dump your data into a SQLite database and serve it with datasette.
[–] bketelsen 5y ago ↗ json-server is my favorite tool to do this: https://www.npmjs.com/package/json-serverJust point it at a json data file and smile. [–] bketelsen 5y ago ↗ Should mention its cousin json-graphql-server:https://www.npmjs.com/package/json-graphql-serverSome quick recipes to use both: https://www.cueblox.com/recipes/
[–] bketelsen 5y ago ↗ Should mention its cousin json-graphql-server:https://www.npmjs.com/package/json-graphql-serverSome quick recipes to use both: https://www.cueblox.com/recipes/
4 comments
[ 0.18 ms ] story [ 21.9 ms ] threadAll you have to do is dump your data into a SQLite database and serve it with datasette.
Just point it at a json data file and smile.
https://www.npmjs.com/package/json-graphql-server
Some quick recipes to use both: https://www.cueblox.com/recipes/