{"id":13876117,"url":"https://github.com/nikhilw/node-selfx-packager","last_synced_at":"2025-07-16T10:33:09.332Z","repository":{"id":136058893,"uuid":"80976014","full_name":"nikhilw/node-selfx-packager","owner":"nikhilw","description":"A package script for node and demo repository","archived":false,"fork":false,"pushed_at":"2017-02-25T13:38:23.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-07T06:06:09.471Z","etag":null,"topics":["distribution","nodejs","packaging"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/nikhilw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-05T07:13:32.000Z","updated_at":"2023-10-16T20:38:05.000Z","dependencies_parsed_at":"2023-05-13T22:00:27.459Z","dependency_job_id":null,"html_url":"https://github.com/nikhilw/node-selfx-packager","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/nikhilw%2Fnode-selfx-packager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilw%2Fnode-selfx-packager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilw%2Fnode-selfx-packager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilw%2Fnode-selfx-packager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhilw","download_url":"https://codeload.github.com/nikhilw/node-selfx-packager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226126067,"owners_count":17577472,"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":["distribution","nodejs","packaging"],"created_at":"2024-08-06T06:01:01.913Z","updated_at":"2024-11-24T04:30:54.806Z","avatar_url":"https://github.com/nikhilw.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# node-selfx-packager\nA packaging script for node and demo repository\n\n## Prepare\n* Clone the repository\n* cd into mymodule directory and run: ```npm install```\n* Test your module by running the script: ./workDir/run_module_directly.sh\n\n## Package\ncd to the base of the repository and run the command below to package the application.\n```bash\n./selfXpackager.sh -s node-bin/launcher.sh -n selfExeSample -b node-bin/node -m mymodule/ -o dist/\n```\n\n## Run\ncd to workDir directory to apply overrides, or any directory where you would rather keep your overrides file and run the command below.\n```bash\n../dist/selfExeSample_launcher.sh\n```\nOR, if you had passed arch flag as x64, then:\n```bash\n../dist/selfExeSample_x64_launcher.sh\n```\n\nNote: it has name as: \u0026lt;process name\u0026gt;[_\u0026lt;arch flag\u0026gt;]_launcher.sh\n\n## Options\n\n* s: Path of the launcher **script**\n* n: **Name** of the final process when it starts.\n* b: Path to node.js **binary**\n* m: Path to nodejs **module** with dependencies\n* o: **Output** directory for the package.\n* t: Direct path to gzipped **tar** file, if you already have bundled it.\n* a: Processor/OS arch, Ex. x86/x64. Only used in file name, so you know which file is built with which node binary. \n\n## Directory structure\n* /mymodule: a sample node package. Check out the index.js file for sample code.\n* /node-bin: a directory place your node binary in. Does not have to be done so, but the command becomes easier that way.\n* /workDir: a directory to run the package from. There is a sample config overrides files in there.\n* /dist: This is where the output will be generated by the script.\n\n## Optionally loading js files\nThere was a requirement to allow a .js type file for configuration instead of .json. This can be achived by passing the full path to this .js as an attribute of application.json and requiring it from within application. Ex: ```{\"config\": \"/.../application.config.js\"}```.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilw%2Fnode-selfx-packager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhilw%2Fnode-selfx-packager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilw%2Fnode-selfx-packager/lists"}