Reputation: 22343
I want to package the typescript-runner tsx into an executable so that it is not dependent on nodejs or npm to be ran. How is this possible? I wanted to use vercel/pkg but it seems to have problems with the esm syntax.
Upvotes: 2
Views: 395
Reputation: 49661
you could use nexe
nexe server.js -r "public/**/*.html"
For more CLI options see: nexe --help
Motivation and Features
- Self contained applications
- Ability to run multiple applications with different node.js runtimes.
- Distribute binaries without needing node / npm.
- Idempotent builds
- Start and deploy faster.
- Lockdown specific application versions, and easily rollback.
- Flexible build pipeline
- Cross platform builds
Or if you are familiar with docker, you could create a container of your tsx-runner project along with other containers, you could manage the multi container system with docker-compose
Upvotes: 0