Running application without node.js written in amber

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Running application without node.js written in amber

XumuK
Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

Nicolas Petton
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

XumuK
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q52OCZJ838gJ">hubb...@...> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Q52OCZJ838gJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

XumuK
Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

xekoukou
nodejs also loads the javascript files while loading only the index.html loads only the index.html.


2013/4/19 XumuK <[hidden email]>
Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

XumuK
And how can i run this app without nodejs?

пятница, 19 апреля 2013 г., 16:47:56 UTC+4 пользователь Apostolis Xekoukoulotakis написал:
nodejs also loads the javascript files while loading only the index.html loads only the index.html.


2013/4/19 XumuK <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="PYx7NYYc4yYJ">hubb...@...>
Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="PYx7NYYc4yYJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

Paul DeBruicker
You have to use a webserver, but it doesn't have to be node.

Python has the SimpleHTTPServer so you could run this in the same
directory as your index.html file


python -m SimpleHTTPServer


and then go to localhost:8000  and see what you get.


Or set up nginx, apache, etc.... to server the static files you need




On 04/19/2013 06:02 AM, XumuK wrote:

> And how can i run this app without nodejs?
>
> пятница, 19 апреля 2013 г., 16:47:56 UTC+4 пользователь Apostolis
> Xekoukoulotakis написал:
>
>     nodejs also loads the javascript files while loading only the
>     index.html loads only the index.html.
>
>
>     2013/4/19 XumuK <[hidden email] <javascript:>>
>
>         Here the index.html which i try to open without node.js
>         What is wrong?
>
>         <html lang="ru">
>         <head>
>         <title>Graph visualizer</title>
>         <meta http-equiv="Content-Type" content="text/html; ">
>         <link href="style.css" rel="stylesheet" type="text/css">
>         <script type="text/javascript" src="../../js/amber.js"></script>
>         <script src="../_lib/jquery.min.js"></script>
>         <script src="../_lib/arbor.js"></script>  
>         <script type="text/javascript">    
>              loadAmber({
>         files: ['Graphs.js'],
>         prefix: 'projects/GraphVisualizer/js',
>         ready: function() {
>              $(function() {
>                smalltalk.GraphVisualizer._new()._init();
>              });
>             }
>             });
>             </script>
>         </head>
>         <body>
>         <div id="toolBar">
>          <input id="browserButton" class="toolbutton" type="button"
>         value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
>         </div>
>
>         ..........other html tags.........
>
>         <canvas id="viewport" width="600" height="400"></canvas>
>         </body>
>         </html>
>
>         пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK
>         написал:
>
>             It means that i need to open /path-to-project/index.html in
>             any browser and this application will work?
>             I try ti do this, but it not worked...
>
>             пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь
>             nicolas petton написал:
>
>                 Sure, it's just js files at the end. node.js is used for
>                 convenience to serve the pages and handle Amber package
>                 commits.
>
>                 Nico
>
>
>                 On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:
>
>>                 Is it possible to run application written an Amber
>>                 without node.js? I mean is it nessesary to run file
>>                 server with/node ./server/sever.js /?
>>
>>                 --
>>                 You received this message because you are subscribed
>>                 to the Google Groups "amber-lang" group.
>>                 To unsubscribe from this group and stop receiving
>>                 emails from it, send an email to
>>                 amber-lang+...@googlegroups.__com.
>>                 For more options, visit
>>                 https://groups.google.com/__groups/opt_out
>>                 <https://groups.google.com/groups/opt_out>.
>>                  
>>                  
>
>                 --
>                 Nicolas Petton
>                 http://www.nicolas-petton.fr
>
>         --
>         You received this message because you are subscribed to the
>         Google Groups "amber-lang" group.
>         To unsubscribe from this group and stop receiving emails from
>         it, send an email to [hidden email] <javascript:>.
>         For more options, visit https://groups.google.com/groups/opt_out
>         <https://groups.google.com/groups/opt_out>.
>          
>          
>
>
>
>
>     --
>
>
>     Sincerely yours,
>
>          Apostolis Xekoukoulotakis
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

Manfred Kröhnert
In reply to this post by xekoukou
Hi Apostolis,

Node.js is used as a simple webserver and not for loading the JS files.

As described in the 'Writing my first app' page in the wiki you first need to load the file js/amber.js into your index.html via a <script> tag.
This provides the loadAmber() function which then is responsible for loading the JS files.

Best,
Manfred




On Fri, Apr 19, 2013 at 2:47 PM, Apostolis Xekoukoulotakis <[hidden email]> wrote:
nodejs also loads the javascript files while loading only the index.html loads only the index.html.


2013/4/19 XumuK <[hidden email]>
Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

Manfred Kröhnert
In reply to this post by XumuK
Hi Xumuk,

the problem is on the following line in amber.js:


If you comment out the follwoing three lines you should be able to load index.html directly from the filesystem:

if (typeof jQuery != 'undefined') {
loadJS = loadJSViaJQuery;
}

What happens is that jquery gets loaded in the browser and is therefore used for loading the JS files via XHR.
Since index.html is not served via http it is also not possible to use XHR to load JS files.

Best,
Manfred


On Fri, Apr 19, 2013 at 3:02 PM, XumuK <[hidden email]> wrote:
And how can i run this app without nodejs?

пятница, 19 апреля 2013 г., 16:47:56 UTC+4 пользователь Apostolis Xekoukoulotakis написал:
nodejs also loads the javascript files while loading only the index.html loads only the index.html.


2013/4/19 XumuK <[hidden email]>

Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

xekoukou
Nodejs gets the request from loadAmber(), and sends the js files.

But a browser can also load files directly from the filesystem, is that what you are saying?


2013/4/20 Manfred Kröhnert <[hidden email]>
Hi Xumuk,

the problem is on the following line in amber.js:


If you comment out the follwoing three lines you should be able to load index.html directly from the filesystem:

if (typeof jQuery != 'undefined') {
loadJS = loadJSViaJQuery;
}

What happens is that jquery gets loaded in the browser and is therefore used for loading the JS files via XHR.
Since index.html is not served via http it is also not possible to use XHR to load JS files.

Best,
Manfred


On Fri, Apr 19, 2013 at 3:02 PM, XumuK <[hidden email]> wrote:
And how can i run this app without nodejs?

пятница, 19 апреля 2013 г., 16:47:56 UTC+4 пользователь Apostolis Xekoukoulotakis написал:
nodejs also loads the javascript files while loading only the index.html loads only the index.html.


2013/4/19 XumuK <[hidden email]>

Here the index.html which i try to open without node.js
What is wrong?

<html lang="ru">
<head>
<title>Graph visualizer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../../js/amber.js"></script>
<script src="../_lib/jquery.min.js"></script>
<script src="../_lib/arbor.js"></script>  
<script type="text/javascript">    
      loadAmber({ 
files: ['Graphs.js'], 
prefix: 'projects/GraphVisualizer/js', 
ready: function() {
      $(function() {
        smalltalk.GraphVisualizer._new()._init();
      });
    }
    });
    </script>
</head>
<body>
<div id="toolBar">
  <input id="browserButton" class="toolbutton" type="button" value="OpenBrowser" onclick="smalltalk.Browser._open()"></button>
</div>

..........other html tags.........

<canvas id="viewport" width="600" height="400"></canvas>
</body>
</html>

пятница, 19 апреля 2013 г., 16:31:15 UTC+4 пользователь XumuK написал:
It means that i need to open /path-to-project/index.html in any browser and this application will work?
I try ti do this, but it not worked...

пятница, 19 апреля 2013 г., 16:26:46 UTC+4 пользователь nicolas petton написал:
Sure, it's just js files at the end. node.js is used for convenience to serve the pages and handle Amber package commits.

Nico


On Apr 19, 2013, at 2:25 PM, XumuK <[hidden email]> wrote:

Is it possible to run application written an Amber without node.js? I mean is it nessesary to run file server with node ./server/sever.js ?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

Herby Vojčík


Apostolis Xekoukoulotakis wrote:
> Nodejs gets the request from loadAmber(), and sends the js files.
Not necessarily nodejs. Any server. apache. nginx. python -m
SimpleHTTPServer. Name your own.

> But a browser can also load files directly from the filesystem, is that
> what you are saying?
>
>
> 2013/4/20 Manfred Kröhnert <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi Xumuk,
>
>     the problem is on the following line in amber.js:
>
>     https://github.com/amber-smalltalk/amber/blob/master/js/amber.js#L224
>
>     If you comment out the follwoing three lines you should be able to
>     load index.html directly from the filesystem:
>
>     if (typeof jQuery != 'undefined') {
>
>
>     loadJS = loadJSViaJQuery;
>
>
>     }
>
>
>     What happens is that jquery gets loaded in the browser and is
>     therefore used for loading the JS files via XHR.
>     Since index.html is not served via http it is also not possible to
>     use XHR to load JS files.
>
>     Best,
>     Manfred

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Running application without node.js written in amber

xekoukou
yup.


2013/4/20 Herby Vojčík <[hidden email]>


Apostolis Xekoukoulotakis wrote:
Nodejs gets the request from loadAmber(), and sends the js files.
Not necessarily nodejs. Any server. apache. nginx. python -m SimpleHTTPServer. Name your own.

But a browser can also load files directly from the filesystem, is that
what you are saying?


2013/4/20 Manfred Kröhnert <[hidden email]
<mailto:[hidden email]>>


    Hi Xumuk,

    the problem is on the following line in amber.js:

    https://github.com/amber-smalltalk/amber/blob/master/js/amber.js#L224

    If you comment out the follwoing three lines you should be able to
    load index.html directly from the filesystem:

    if (typeof jQuery != 'undefined') {


    loadJS = loadJSViaJQuery;


    }


    What happens is that jquery gets loaded in the browser and is
    therefore used for loading the JS files via XHR.
    Since index.html is not served via http it is also not possible to
    use XHR to load JS files.

    Best,
    Manfred

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.





--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.