{"id":18360020,"url":"https://github.com/james9074/lambda","last_synced_at":"2026-04-13T20:03:19.190Z","repository":{"id":23901138,"uuid":"100134550","full_name":"James9074/lambda","owner":"James9074","description":"It's like JSFiddle, but any language and you can execute your code via the API. Enterprise friendly. GraphQL. https://lambda.wlan1.net","archived":false,"fork":false,"pushed_at":"2023-01-11T00:53:00.000Z","size":1368,"stargazers_count":3,"open_issues_count":56,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T10:53:58.102Z","etag":null,"topics":["docker","graphql","js","lambda","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/James9074.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-12T19:49:37.000Z","updated_at":"2022-07-07T18:37:34.000Z","dependencies_parsed_at":"2022-08-20T01:50:50.601Z","dependency_job_id":null,"html_url":"https://github.com/James9074/lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James9074%2Flambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James9074%2Flambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James9074%2Flambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James9074%2Flambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/James9074","download_url":"https://codeload.github.com/James9074/lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248150416,"owners_count":21055927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","graphql","js","lambda","react"],"created_at":"2024-11-05T22:26:18.485Z","updated_at":"2026-04-13T20:03:19.183Z","avatar_url":"https://github.com/James9074.png","language":"JavaScript","readme":"![Lambda Banner](lambda.png)  \n# Lambda  [![build status](https://gitlab.com/James9074/lambda/badges/master/build.svg)](https://gitlab.com/James9074/lambda/commits/master) ![graphql](https://img.shields.io/badge/style-%E2%9C%93-blue.svg?style=flat\u0026label=GraphQL) ![react](https://img.shields.io/badge/style-%E2%9C%93-blue.svg?style=flat\u0026label=React) ![Docker](https://img.shields.io/badge/style-%E2%9C%93-blue.svg?style=flat\u0026label=Docker\u0026)\nA code playground and micro api creation platform allowing developers to put scripts \"on tap\" without the need to stand up dedicated resources. This is what we get when we combine AWS Lambda and JSFiddle.\n\nCreated with love from [Kirasoft's Nodejs API Starter](https://github.com/kriasoft/nodejs-api-starter) repo.\n\n## File Guidelines\n`docker-compose.yml` - The production-ready docker-compose file.\n`docker-compose.override.yml` - The development-ready docker-compose file, with app-code volume mounts and port exposures configured\n\nThe Dockerfiles are configured with the correct CMD entries for prod, so there's no `command` entry in the docker-compose.yml file, but the `docker-compose.override.yml` file does have a development friendly command that laucnhes the app in watch-mode.\n\n## Getting Started (Dev)\n```bash\ngit clone \u003crepo\u003e\ndocker-compose up -d # this will automatically run DB migrations\ncd api \u0026\u0026 yarn docker-db-seed\n# Optionally, if you want to rollback migrations and restore the database to a clean, unseeded state:\ndocker-db-reset\n```\n\n### Fun yarn shortcuts\n**`cd api \u0026\u0026 ...`**\n- `yarn docker-db-migrate` - runs the migrations. Useful on first start or after writing a migration file\n`- yarn docker-db-seed` - Seeds the DB with [Faker](https://www.npmjs.com/package/Faker) data\n- `yarn docker-db-reset` - Rolls back all migrations and runs `docker-db-migrate` for you. Effectively gives a clean slate.\n- `yarn docker-db-rollback`- Rolls back the DB, but doesn't restore it.\n\n## Getting Started (Prod)\n```bash\ngit clone \u003crepo\u003e\n./build-prod  # Just a shortcut for building with the prod docker-compose file. This is critical, since the override file (dev) will build with volume mounts, which is bad.\ndocker-compose -f docker-compose.yml up -d # Starts the services in prod mode without the dev volumes\n```\n\n### Prod Notes\nThe `docker-compose.yml` build only incudes the build output, meaning `/src`, `/test`, `/db`, and a few other things are not in the image.\n\n\n### Quick GraphQL Query Examples\n```graphql\nmutation DeleteLambda($input: DeleteLambdaInput!) {\n  deleteLambda(input: $input) {\n    result\n  }\n}\n\nmutation UpdateLambda($updateInput: UpdateLambdaInput!) {\n  updateLambda(input: $updateInput) {\n    lambda{\n      id,\n      name,\n      slug,\n      code,\n      updatedAt\n    }\n  }\n}\n\nquery GetCurrentUser {\n  me {\n    id\n    displayName\n    lambdas {\n      name,\n      slug,\n    }\n  }\n}\n\nquery GetSingleUser {\n  node(id: \"VXNlcjplMmQ5N2RiNi03YTE1LTExZTctYmQ1Zi0zMzk3NDBmMzQ5NGM=\") {\n    id\n    ... on User {\n      displayName\n      username\n      emails{\n        email\n      }\n      lambdas {\n        name\n        slug\n      }\n    }\n  }\n}\n\nquery GetSingleUserById {\n  user(id:\"3339ee26-7a4d-11e7-9b78-87460c3a2f4b\") {\n    id\n    displayName\n    lambdas {\n      name,\n      slug,\n    }\n  }\n}\n\nquery GetSingleUserByUsername {\n  user(username:\"Hillard.Streich46\") {\n    id\n    displayName\n    lambdas {\n      name,\n      slug,\n    }\n  }\n}\n\nquery GetAllUsers {\n  users(first: 10) {\n    edges {\n      node {\n        id\n        displayName\n        lambdas {\n          name\n          slug\n        }\n      }\n    }\n  }\n}\n\nquery GetAllLambdas {\n  lambdas(first: 10) {\n    edges {\n      node {\n        name\n        slug\n        owner_id,\n        owner{\n          displayName,\n          username,\n          emails{\n            email\n          }\n        }\n      }\n    }\n  }\n}\n\nquery GetSingleLambdaBySlug {\n  lambda(slug:\"H1SxurWuW\") {\n    name,\n    id,\n    slug,\n    owner{\n      username\n      id\n    }\n  }\n}\n\nquery GetAllLambdasByUsername {\n  lambdas(username:\"Hillard.Streich46\") {\n    edges {\n      node {\n        name\n        slug\n        owner_id,\n        owner{\n          displayName,\n          username,\n          emails{\n            email\n          }\n        }\n      }\n    }\n  }\n}\n\nmutation CreateLambda($createInput: CreateLambdaInput!){\n  createLambda(input: $createInput) {\n    lambda{\n      id\n    }\n  }\n}\n\n```\n\n...and the inputs:\n\n```JSON\n{\n  \"input\": {\n    \"slug\": \"H1SxurWuW\"\n  },\n  \"createInput\": {\n    \"slug\": \"H1SxurWuW\",\n    \"name\": \"test\",\n    \"description\": \" test\",\n    \"inputs\": \"[]\",\n    \"code\": \"teasdasdst\",\n    \"owner_id\": \"fc956662-822a-11e7-9da0-e7a666d18b85\",\n    \"public\": 1\n  },\n  \"updateInput\": {\n    \"slug\": \"H1SxurWuW\",\n    \"name\": \"updated\",\n    \"description\": \" test2\",\n    \"inputs\": \"[]\",\n    \"code\": \"teasdasdst\",\n    \"owner_id\": \"fc956662-822a-11e7-9da0-e7a666d18b85\",\n    \"public\": 1\n  }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames9074%2Flambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames9074%2Flambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames9074%2Flambda/lists"}