Sign inSign up

shahriyardx/json-server

By shahriyardx

•Updated 6 months ago

Image
0

419

shahriyardx/json-server repository overview

⁠JSON Server

Turn JSON files into REST APIs. Instantly. Sign in with GitHub, upload a .json file, and get a public URL you can use right away. No backend to build, no servers to manage.


⁠Quick Start (docker compose)

docker pull shahriyardx/json-server
docker run -d \
  -p 3000:3000 \
  -e DATABASE_URL=postgresql://user:password@host:5432/jsonserver \
  -e GITHUB_CLIENT_ID=your_github_oauth_client_id \
  -e GITHUB_CLIENT_SECRET=your_github_oauth_client_secret \
  -e BETTER_AUTH_SECRET=$(openssl rand -hex 32) \
  -e BETTER_AUTH_URL=http://localhost:3000 \
  shahriyardx/json-server

⁠Required Environment Variables

VariableDescription
DATABASE_URLPostgreSQL connection string
GITHUB_CLIENT_IDGitHub OAuth App client ID
GITHUB_CLIENT_SECRETGitHub OAuth App client secret
BETTER_AUTH_SECRETRandom secret for session encryption. Generate with openssl rand -hex 32
BETTER_AUTH_URLPublic URL of your instance (e.g. http://localhost:3000)

⁠GitHub OAuth Setup

Create an OAuth app at GitHub Settings → Developer settings → OAuth Apps:

  • Homepage URL: your instance URL (e.g. http://localhost:3000)
  • Authorization callback URL: http://localhost:3000/api/auth/callback/github

Set the client ID and secret as env vars when starting the container.

Tag summary

Content type

Image

Digest

sha256:4f6a4918e…

Size

415.4 MB

Last updated

6 months ago

docker pull shahriyardx/json-server