I can't find any evidence on whether its possible to write node js code in meteor 1.3 client side. I went through some old questions but those days it was not available. I had read somewhere that it would be possible from 1.3 onwards. But I cannot find that source again. Can someone explain whether its now possible to write nodejs code in meteor client side?
Asked
Active
Viewed 227 times
0
-
What do you mean by write NodeJS code on the client side? "NodeJS code" is JavaScript and NodeJS is an application on the server that uses the V8 engine. NodeJS doesn't run in the client's browser. – Marty Jun 16 '16 at 01:05
-
I mean will I be able to use node JS syntax such as "require" ? I just wanted to clarify whether I need to browserify my code to run in the meteor client or whether the same nodeJS code can be used to run in the meteor client. – AnOldSoul Jun 16 '16 at 02:38
1 Answers
2
Your question is worded in a way that it is not easy to understand what you want.
It seems your question is about if you can use JS modules (which is what you usually find inside NPM packages) on the client in Meteor 1.3.
In that case the answer is yes, and the "evidence" is quite easy to find in the manual.
Note that Meteor recommends to use import
rather than require
, but require
will still work.

Jesper We
- 5,977
- 2
- 26
- 40
-
What is mentioned in the manual is that node modules and require command will work from server side. But whether it'll work from client side has not been mentioned. That's what I would like to know. Whether meteor client can contain "require" and node modules – AnOldSoul Jun 16 '16 at 07:16
-
If you click the link I provided in the answer above, the second paragraph is called "npm on the client": All the info you are looking for is there. – Jesper We Jun 16 '16 at 08:15