Skip to content

Discussion: Deploying nodejs apps to end-users machine #11702

Closed
@azev

Description

@azev

Hello everyone,
I'm looking for a proper way to deploy NodeJS apps to end-users without having to bundle everything in one single package. Like a Stub, a small binary/script that will download all dependencies to the end-user's computer. (Eg. Firefox stub download)

Please refer to: http://stackoverflow.com/questions/42609945

Putting everything in a single package like some do is all wrong.
The user will be downloading a package containing the main app scripts + nodejs binary + node_modules dependencies. Which in the end, will all be outdated unless the developer/publisher keeps his package updated constantly. Not to mention a layman user wouldn't know how to handle the package.

Is it there a stub/script/wizard that does that?

The logic I think

  • Download the core script app (Only the actual script/app files without the node_modules folder)
  • Download latest nodejs binary (Eg: https://nodejs.org/dist/latest/win-x64/)
  • Silent set up nodejs, paths, environment variables and npm.
  • Download the node_modules described in package.json
  • Create a desktop shortcut (Eg: http://127.0.0.1/8000).
  • Possibly add an alias entry to app name instead of ip:port So the app can be accessed by its name on the browser.

I wrote two nice nodeJS apps but I don't know how to publish them properly.
Please, have your say!

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions