{"id":21516506,"url":"https://github.com/nexys-system/server-boilerplate","last_synced_at":"2026-05-09T18:35:00.779Z","repository":{"id":36950696,"uuid":"296957689","full_name":"nexys-system/server-boilerplate","owner":"nexys-system","description":"Server boilerplate in Typescript for nexys-system","archived":false,"fork":false,"pushed_at":"2022-12-09T15:35:14.000Z","size":416,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T02:59:50.243Z","etag":null,"topics":["boilerplate","koa","nexys","node","typescript"],"latest_commit_sha":null,"homepage":"https://app.nexys.io","language":"TypeScript","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/nexys-system.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":"2020-09-19T21:54:52.000Z","updated_at":"2022-06-20T13:30:14.000Z","dependencies_parsed_at":"2023-01-17T07:46:03.683Z","dependency_job_id":null,"html_url":"https://github.com/nexys-system/server-boilerplate","commit_stats":null,"previous_names":[],"tags_count":11,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Fserver-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Fserver-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Fserver-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexys-system%2Fserver-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexys-system","download_url":"https://codeload.github.com/nexys-system/server-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066191,"owners_count":20392407,"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":["boilerplate","koa","nexys","node","typescript"],"created_at":"2024-11-24T00:21:48.021Z","updated_at":"2026-05-09T18:34:55.720Z","avatar_url":"https://github.com/nexys-system.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexys Backend Typescript Boilerplate\n\n[![Test](https://github.com/nexys-system/server-boilerplate/actions/workflows/test.yml/badge.svg)](https://github.com/nexys-system/server-boilerplate/actions/workflows/test.yml)\n[![Docker](https://github.com/nexys-system/server-boilerplate/actions/workflows/publish.yml/badge.svg)](https://github.com/nexys-system/server-boilerplate/actions/workflows/publish.yml)\n\nThis repo generates a fully working node server (typescript).\n\nIt is based on [nexys/core](https://github.com/nexys-system/core) [![NPM package](https://badge.fury.io/js/%40nexys%2Fcore.svg)](https://www.npmjs.com/package/@nexys/core) and most configurations can be managed in [nexys.io](https://app.nexys.io).\n\n## Get started\n\nclick on _use this template_, clone your repo locally and\n\n```\n# install dependencies\nyarn\n# watch - will run on port 3000 and reload after changes are applied\nyarn watch\n```\n\nNote: that the CI Node version is set to 18.If your build fails locally try to change your node version so it matches the one used in the CI.\n\n### Sync with Nexys.io\n\n#### Get the Environment Variables\n\n```\nyarn getEnvVar\n```\n\nYou will then be prompted for a token. You can generate the token in the nexys.io platform on top the of the env var panel (in the service of interest)\n\nA `.env` file will be generated with the environment variables. Note that if you are using a database, you need to tick the option when configuring the service and the database env var will be added automatically.\n\n#### Get the Assets\n\n```\nyarn getAssets\n```\n\nThis will fetch the data model, the submodels, roles, option sets, api requests, and workflows.\n\nNote: this command can only be run if you have the environment variables and an `APP-TOKEN`.\n\n## GraphQL\n\nYou can query the database using [GraphQL](https://graphql.org/). The URLs are\n* `host/graphql/query` for querying\n* `host/graphql/schema` for the schema\n\n### Graphql query examples (tested in postman)\n\n#### Query\n\n```\n{\n  Instance{name}\n}\n```\n\n#### Mutation\n\n##### Insert\n\n```\nmutation {\n  insertInstance( name:\"main\", logDateAdded: \"2022-12-12\"){uuid}\n}\n```\n\n##### Update \n\n```\nmutation {\n  updateInstance(data:{name: \"main2\"}, filters:{name: \"main\"}){updated}\n}\n```\n\n##### Delete\n\n```\nmutation {\n  deleteInstance(input:{uuid:\"20074488-2467-11ed-8130-42010aac000a\"}){deleted}\n}\n```\n\n### Accessing the GraphQL object from within the app\n\n```\nimport { graphql, printSchema } from \"graphql\";\nimport Schema from \"@nexys/fetchr/dist/graphql/schema\";\n\nconst query:string = \"\"; // graphql query\n\nconst result = await graphql({ schema: schemas.gQLSchema, source: query });\n```\n\nDon't forget to add the `APP-TOKEN` (look in your `.env` file) in the headers: `Authorization: Bearer APP-TOKEN`\n\n## Deployment\n\nA docker is generated upon new version creation, see https://github.com/nexys-system/server-boilerplate/releases\n\n## CI\n\nevery push goes through CI and can be monitored [here](https://github.com/nexys-system/server-boilerplate/actions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexys-system%2Fserver-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexys-system%2Fserver-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexys-system%2Fserver-boilerplate/lists"}