Organizational Research By

Surprising Reserch Topic

how to use node js module system on the clientside


how to use node js module system on the clientside  using -'javascript,node.js'

I would like to use the CommonJS module system in a clientside javascript application. I chose nodejs as implementation but can't find any tutorial or docs on how to use nodejs clientside, ie without using node application.js

I included node.js like this in my html page:

<script type="text/javascript" src="node.js"></script>


Note that I didn't make nodejs on my local machine, I'm on Windows anyway (I'm aware of the Cygwin option).
When I want to use the require function in my own javascript it says it's undefined.

var logger = require('./logger');


My question is, is it possible to use nodejs like this?
    

asked Sep 18, 2015 by jekbishnoi
0 votes
55 views



Related Hot Questions

3 Answers

0 votes
NULL
answered Sep 18, 2015 by shikhar jain
0 votes
NULL
answered Sep 18, 2015 by mannar kande
0 votes
NULL
answered Sep 18, 2015 by devkumargupta

...