{"id":24116338,"url":"https://github.com/adamazad/trador-data","last_synced_at":"2026-05-11T08:54:45.272Z","repository":{"id":56159726,"uuid":"312333336","full_name":"adamazad/trador-data","owner":"adamazad","description":"Trådor's Auth and API servers","archived":false,"fork":false,"pushed_at":"2020-11-25T09:46:23.000Z","size":463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T06:16:06.772Z","etag":null,"topics":["authentication","hapi","rest"],"latest_commit_sha":null,"homepage":"https://trador.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamazad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T16:28:14.000Z","updated_at":"2020-11-25T09:46:26.000Z","dependencies_parsed_at":"2022-08-15T13:50:35.829Z","dependency_job_id":null,"html_url":"https://github.com/adamazad/trador-data","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/adamazad%2Ftrador-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamazad%2Ftrador-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamazad%2Ftrador-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamazad%2Ftrador-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamazad","download_url":"https://codeload.github.com/adamazad/trador-data/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241150302,"owners_count":19918347,"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":["authentication","hapi","rest"],"created_at":"2025-01-11T06:16:18.601Z","updated_at":"2026-05-11T08:54:45.212Z","avatar_url":"https://github.com/adamazad.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trådor Back-End\n\nBoth servers share the `User` model, so a monorepo was ideal at the moment. However, an ideal configuration would be three packages:\n\n1. `trador-models`: an NPM package containing all the models with types. Installed from source as a dependency.\n2. `auth-server`: contains all Auth controllers and services.\n3. `api-server`: contains all API controllers and services.\n\n## Auth Server\n\nSee [`src/servers/auth-server`](src/servers/auth-server)\n\n## API Server\n\nSee [`src/servers/api-server`](src/servers/api-server)\n\n# Building\n\nRun\n\n```\n$ npm run build\n```\n\n# Deployment\n\nCreate a copy of `.env.sample` and rename it to `.env`\n\n```\n$ cp .env.sample .env\n```\n\nAll can be left as they are except for `MONGO_URI`.\n\nBoth servers can be deployed using [PM2](https://pm2.io) in a single command. The configurations are in `ecosystem.config.js`. In the command line, type:\n\n```\n$ pm2 start ecosystem.config.js\n```\n\nEach server is configured to have two instances, which is more than enough for a small-scale application.\n\nLogs can be traced using by running:\n\n```\n$ pm2 logs\n```\n\n# Proxy\n\nYou can setup an Nginx proxy like this:\n\n```nginx\nserver {\n  listen 80;\n  listen [::]:80;\n  server_name auth.app.io;\n  location / {\n    proxy_pass http://127.0.0.1:4001;\n  }\n}\nserver {\n  listen 80;\n  listen [::]:80;\n  server_name api.app.io;\n  location / {\n    proxy_pass http://127.0.0.1:4002;\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamazad%2Ftrador-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamazad%2Ftrador-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamazad%2Ftrador-data/lists"}