-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a service for package.json scripts #12
Comments
The idea behind servicer was to run services in production environment. Is there a reason behind why you cannot build index.ts and then run it with node?
Edit: |
As mentioned in the docs sudo ln -s $(which node) "/usr/local/bin/node" Lmk if this works |
I use tsx because it's a very simple build system and works very cleanly with how I use the I may just switch to including the build step in my production update flow (before doing |
My "start" script is
tsx src/index.ts
so I tried the following:The first was me hoping it didnt check if the file was real, but it does so that "hack" didnt work.
The second didn't work because
tsx
's hashbang getsnode
from the env, which doesn't exist til~/.bashrc
is ran.I suggest there should be a builtin way to do package.json scripts as services, or the even more abstractly any command.
Until then my workaround is to make an executable:this did not work either lolprintf '#!'$(which bash)'\npnpm start\n'
The text was updated successfully, but these errors were encountered: