{"id":18583537,"url":"https://github.com/maxdome/mxd-environment","last_synced_at":"2025-05-16T05:09:45.636Z","repository":{"id":57305953,"uuid":"61203090","full_name":"maxdome/mxd-environment","owner":"maxdome","description":"DEPRECATED | Includes all NPM packages for an app in a maxdome node environment","archived":false,"fork":false,"pushed_at":"2018-01-31T10:30:14.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T16:45:14.683Z","etag":null,"topics":[],"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/maxdome.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":"2016-06-15T11:32:20.000Z","updated_at":"2017-05-22T10:43:33.000Z","dependencies_parsed_at":"2022-09-06T19:40:46.325Z","dependency_job_id":null,"html_url":"https://github.com/maxdome/mxd-environment","commit_stats":null,"previous_names":["maxdome/environment"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fmxd-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fmxd-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fmxd-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdome%2Fmxd-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdome","download_url":"https://codeload.github.com/maxdome/mxd-environment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471048,"owners_count":22076587,"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":[],"created_at":"2024-11-07T00:23:26.899Z","updated_at":"2025-05-16T05:09:45.582Z","avatar_url":"https://github.com/maxdome.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**DEPRECATED: Use [maxdome-node](https://github.com/maxdome/maxdome-node)**\n\n* * *\n\n# Development\n\nFor starting a new project or see the `mxd-environment` in action a template is available:\nhttps://github.com/maxdome/mxd-environment-template\n\n## Example\n\n* `app.js` (with babel and destructioning):\n  \n```\nconst { app, checkhelper, config, express, healthcheck, info, logging, silentLogging }\n  = require('mxd-environment')();\n  \n// example route\n  \napp.get('/', (req, res) =\u003e {\n  res.send('Hello World!');\n});  \n```\n  \n* `app.js` (without babel):\n  \n```\nconst environment = require('mxd-environment')();\nconst app = environment.app;\n\n// example route\n\napp.get('/', (req, res) =\u003e {\n  res.send('Hello World!');\n});\n```\n\n## Optional NPM packages\n\n### mxd-starter (PM2 integration)\n\n* `package.json`:\n\n```\n{\n  \"scripts\": {\n    \"start\": \"mxd-start\",\n    \"status\" : \"mxd-status\",\n    \"stop\" : \"mxd-stop\"\n  },\n  \"dependencies: {\n    \"mxd-starter\": \"^2.1.0\"\n  }\n}\n```\n\n### mxd-swagger\n\n`mxd-environment` will automatically setting up the package if its installed.\n\n* `package.json`:\n\n```\n{\n  \"dependencies: {\n    \"mxd-swagger\": \"^1.0.5\"\n  }\n}\n```\n\n## Upgrade from mxd-environment v4.x\n\n* `mxd-starter` is now an optional dependency. It must be defined as project dependency if its in use \n* `mxd-swagger` is now automatically setting up if its installed\n\n\n## Upgrade from mxd-environment v3.x\n\n* `mxd-config` handles also the `all.json` and `development.json`. The code to require them can be removed. Also the \n`config` param to initialize `mxd-environment` must be removed. The `config` is available via `environment.config`\n* The express `app` is now initialized (includes also the `.listen()`) by the library, use it via `environment.app`, \nthe express library is available via `environment.express`\n* The `app` param is removed from `environment.info()` and `environment.healthcheck()`\n* `environment.healthcheck.checkhelper` is now `environment.checkhelper`\n\n\n# Systemadministration\n\nDocumentation contains all subpackages and the additional `mxd-swagger`.\n\n## Configuration\n\nAll configurations can be overwritten in the `config/properties.json`.\nThere are different attributes offered by the different subpackages of the `mxd-environment` and different depending on \nthe application itself.\n\n**Important:** If an attribute is overwritten, the complete tree of the attribut must be defined!\n\n* `mxd-express`:\n```\n{\n  \"port\": 80,\n  \"hostname\": undefined\n}\n```\n\n* `mxd-logging` (mandatory for logging into file):\n```\n{\n  \"logging\": {\n    \"transports\": [\n      { \n        \"type\": \"File\",\n        \"options\": { \n          \"filename\": \"/path/to/the/logfile.log\",\n          \"level\": \"info\"\n        }\n      }\n    ]\n  }\n}\n```\n\n* `mxd-starter`: A bit special and descriped separatly https://github.com/maxdome/mxd-starter\n\n## Routes\n\n* `mxd-express`: `/ping` (all HTTP verbs are allowed) response a 200 if the app is running and shouldn't be restricted\n\n* `mxd-healthcheck`, `mxd-info`, `mxd-swagger`: All routes starting with `/docs`, `/health`, `/info` and the route \n`/api-docs` should be available in the office network or restricted by basic auth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdome%2Fmxd-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdome%2Fmxd-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdome%2Fmxd-environment/lists"}