0

Just like you can extend html pages on the server. I wanted to know if there is any method to join javascript files on the server using node and express or any thing else that works with node. So as to minimize the number of files i have to link to the document and as well as keeping javascript files separate from each other.

1
  • There sure is, just make a route and link it to a function that gets the contents of the files, joins it together, and serves it all together. Commented Mar 1, 2014 at 18:19

1 Answer 1

1

In fact it's better doing it once before deploying your js files on your server, to get better performances, than doing it on runtime.

You may do this with tools like grunt and the task grunt-usemin It will not only allow you to concatenate your files, but also to compress with uglify.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.