Skip to content

Is this package production ready? #653

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

Closed
htonkovac opened this issue Aug 3, 2018 · 4 comments
Closed

Is this package production ready? #653

htonkovac opened this issue Aug 3, 2018 · 4 comments
Labels
question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead.

Comments

@htonkovac
Copy link

Dear maintainers,
Is this cool and very useful package suitable for production or do you recommend to only use this package for development and compile typescript in prod? I am using Docker. Thank you

@blakeembrey
Copy link
Member

Please search past issues before creating a new issue. Can you imagine having to answer every person who uses the package?

To answer, it works fine in production but there will always be a memory overhead. Smaller in transpile only mode since it’ll only track source maps, large in compile mode since it’s got an instance of the TypeScript compiler and files in memory.

If you are concerned about this, transpile first. It’s unlikely you need this in production, but I know many people are using it that way.

@blakeembrey blakeembrey added the question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead. label Aug 7, 2018
@vit100
Copy link

vit100 commented May 30, 2019

@blakeembrey,
You are right, it is necessary to do homework and do research before asking. No offence, but if people ask it means this not clear from documentation.

@htonkovac
Answering to original question - I would not use it in prod (even it is sweet approach) based on idea above plus looking at getting started installation guide:
`# Locally in your project.

npm install -D ts-node
npm install -D typescript`

You see - flag -D?
Means package will not be installed in production docker or prod server (of course if you set env var NODE_ENV=production, which you should).

@blakeembrey
Copy link
Member

blakeembrey commented May 30, 2019

I agree and happy to accept a PR. Unfortunately the answer means something different for each person. For majority, it’s fine to run in production, especially if they’ve been developing using it. For others, the overhead isn’t what they want to accept. I could put an answer in the README saying use it, or not, but it depends. Even you said you wouldn’t based on above, but personally I’d lean towards “just use it” if it works for you since the overhead isn’t high compared to differences in production vs locally.

@vit100
Copy link

vit100 commented May 30, 2019

here you go. lets update doc.
Point is that I was researching myself - as from docs it was not clear what was best practice.
I realize it can be used in prod, with some side effects, but for the sake of complete usage coverage it is good idea to mention it in doc.

P.S. Same as in angular it is very very hidden in doc that ng serve is not good for prod, and if you see all copy/paste tutorials they all use npm run start with "start":"ng serve".... but it is another topic...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead.
Projects
None yet
Development

No branches or pull requests

3 participants