Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

They can always run stderr through uniq. :-) -- Larry Wall in <199704012331.PAA16535@wall.org>


devel / comp.lang.javascript / Node.js

SubjectAuthor
* Node.jsJonas Thörnvall
`* Re: Node.jsJulio Di Egidio
 +* Re: Node.jsJonas Thörnvall
 |+* Re: Node.jsBen Bacarisse
 ||`* Re: Node.jsJonas Thörnvall
 || +- Re: Node.jsArno Welzel
 || `* Re: Node.jsBen Bacarisse
 ||  `* Re: Node.jsJonas Thörnvall
 ||   `- Re: Node.jsJonas Thörnvall
 |+- Re: Node.jsArno Welzel
 |+- Re: Node.jsJulio Di Egidio
 |`* Re: Node.jsScott Sauyet
 | +- Re: Node.jsJonas Thörnvall
 | `* Re: Node.jsJon Ribbens
 |  `- Re: Node.jsJulio Di Egidio
 `* Re: Node.jsJonas Thörnvall
  `* Re: Node.jsArno Welzel
   `- Re: Node.jsJonas Thörnvall

1
Node.js

<5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17349&group=comp.lang.javascript#17349

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:bb86:: with SMTP id l128mr2462060qkf.411.1634178254473;
Wed, 13 Oct 2021 19:24:14 -0700 (PDT)
X-Received: by 2002:a05:6830:546:: with SMTP id l6mr180989otb.306.1634178254204;
Wed, 13 Oct 2021 19:24:14 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Wed, 13 Oct 2021 19:24:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
Subject: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 02:24:14 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Jonas Thörnvall - Thu, 14 Oct 2021 02:24 UTC

I finally decided "try" learn a little node.js.
So i installed according to.
https://nodejs.org/en/docs/guides/getting-started-guide/

And simply copied app.js to my intetpub directory.
But visiting 127.0.0.1:3000 there is nothing.

Must i configure IIS to listen to app.js as start page "index.html"
What happens if i invoke app.js as a script src within index.html?
Can i mix up the node.js code with my vanilla just import them as script SRC?

Re: Node.js

<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17350&group=comp.lang.javascript#17350

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:bf82:: with SMTP id p124mr3253067qkf.45.1634195558699;
Thu, 14 Oct 2021 00:12:38 -0700 (PDT)
X-Received: by 2002:aca:2112:: with SMTP id 18mr3032378oiz.80.1634195558515;
Thu, 14 Oct 2021 00:12:38 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 00:12:38 -0700 (PDT)
In-Reply-To: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.98.47; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.98.47
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
Subject: Re: Node.js
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Thu, 14 Oct 2021 07:12:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Julio Di Egidio - Thu, 14 Oct 2021 07:12 UTC

On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> I finally decided "try" learn a little node.js.
> So i installed according to.
> https://nodejs.org/en/docs/guides/getting-started-guide/
>
> And simply copied app.js to my intetpub directory.

That's not what it says: wherever you put app.js, and assuming you have node in your path, you launch it with "node app.js" from the command line after cd-ing to where the file is (in this case: of course you can also use relative and absolute file system paths).

> But visiting 127.0.0.1:3000 there is nothing.
>
> Must i configure IIS to listen to app.js as start page "index.html"

No, Node is the server here: you are literally writing the code that handles http requests and returns the http responses, your own web server that is.... (I suggest you sat with Express, if you don't want to reinvent a lot of wheels).

> What happens if i invoke app.js as a script src within index.html?

You get runtime errors, it's just not written for the browser context.

> Can i mix up the node.js code with my vanilla just import them as script SRC?

You can have js files where you put some general logic that you want to reuse, and that of course you can share. The rest cannot be shared, one works in the context of a browser hence the various browser DOM's, the other is in the context of Node and Node's object model and libraries.

HTH,

Julio

Re: Node.js

<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17351&group=comp.lang.javascript#17351

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a0c:e109:: with SMTP id w9mr3838625qvk.24.1634200026343;
Thu, 14 Oct 2021 01:27:06 -0700 (PDT)
X-Received: by 2002:aca:1808:: with SMTP id h8mr3033654oih.54.1634200026138;
Thu, 14 Oct 2021 01:27:06 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 01:27:05 -0700 (PDT)
In-Reply-To: <c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com> <c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 08:27:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jonas Thörnvall - Thu, 14 Oct 2021 08:27 UTC

torsdag 14 oktober 2021 kl. 09:12:43 UTC+2 skrev ju...@diegidio.name:
> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> > I finally decided "try" learn a little node.js.
> > So i installed according to.
> > https://nodejs.org/en/docs/guides/getting-started-guide/
> >
> > And simply copied app.js to my intetpub directory.
> That's not what it says: wherever you put app.js, and assuming you have node in your path, you launch it with "node app.js" from the command line after cd-ing to where the file is (in this case: of course you can also use relative and absolute file system paths).
> > But visiting 127.0.0.1:3000 there is nothing.
> >
> > Must i configure IIS to listen to app.js as start page "index.html"
> No, Node is the server here: you are literally writing the code that handles http requests and returns the http responses, your own web server that is... (I suggest you sat with Express, if you don't want to reinvent a lot of wheels).
> > What happens if i invoke app.js as a script src within index.html?
> You get runtime errors, it's just not written for the browser context.
> > Can i mix up the node.js code with my vanilla just import them as script SRC?
> You can have js files where you put some general logic that you want to reuse, and that of course you can share. The rest cannot be shared, one works in the context of a browser hence the various browser DOM's, the other is in the context of Node and Node's object model and libraries.
>
> HTH,
>
> Julio
I am not sure what braindead monkey wrote that intro but....

"Now, run your web server using node app.js. Visit http://localhost:3000 and you will see a message saying "Hello World".
Refer to the Introduction to Node.js for a more comprehensive guide to getting started with Node.js."

But i think he left out a couple of steps, like it should be run from commandline, i got it running now.
Is it something similar to PHP, must the whole code base "vanilla javascript" be generated dynamically thru the server?
Or can i from the clientside script invole functionality from server?

For example have a "vanilla script" ask a "node.js" server script what time it is from "browser script"?
I just try to get a hang out of how you use it, i do not exactly remember how PHP did work but i think it mostly was generated dynamically at server, and you sent request strings?
Why i actually want node.js is for passing lowlatency messaging back and forth user "groups" via server or could i even use it to set up peer to peer communication?
I also saw that there was someone that had built a library that invoked ASIO "lowlatency audio" via node.js although it certainly seem out of my skill range.

Thanks for explanation, sometimes people just take things for granted writing about them, but i cannot see how anyone should thought that the app.js should been invoked from command line coming from clientside scripting.
Could someone point me to a "simplest" example of howto invoke a call to node js server "ask for something and return a string into javascript????" http request???.

For example a vanilla script request a node js server script that pass the server clock back "if that is really how it is done".
I guess there must be some way for client "browser script" todo serverside requests, and wish i had saved a bit PHP code from some 20 years ago....

Because the communication from script with server is a bit similar or?

Re: Node.js

<59c3716a-2c09-432c-8822-06b48a007bb2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17352&group=comp.lang.javascript#17352

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:14cc:: with SMTP id u12mr4845287qtx.185.1634200989212;
Thu, 14 Oct 2021 01:43:09 -0700 (PDT)
X-Received: by 2002:a05:6830:348c:: with SMTP id c12mr1401291otu.206.1634200988895;
Thu, 14 Oct 2021 01:43:08 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 01:43:08 -0700 (PDT)
In-Reply-To: <c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com> <c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <59c3716a-2c09-432c-8822-06b48a007bb2n@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 08:43:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jonas Thörnvall - Thu, 14 Oct 2021 08:43 UTC

torsdag 14 oktober 2021 kl. 09:12:43 UTC+2 skrev ju...@diegidio.name:
> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> > I finally decided "try" learn a little node.js.
> > So i installed according to.
> > https://nodejs.org/en/docs/guides/getting-started-guide/
> >
> > And simply copied app.js to my intetpub directory.
> That's not what it says: wherever you put app.js, and assuming you have node in your path, you launch it with "node app.js" from the command line after cd-ing to where the file is (in this case: of course you can also use relative and absolute file system paths).
> > But visiting 127.0.0.1:3000 there is nothing.
> >
> > Must i configure IIS to listen to app.js as start page "index.html"
> No, Node is the server here: you are literally writing the code that handles http requests and returns the http responses, your own web server that is... (I suggest you sat with Express, if you don't want to reinvent a lot of wheels).
> > What happens if i invoke app.js as a script src within index.html?
> You get runtime errors, it's just not written for the browser context.
> > Can i mix up the node.js code with my vanilla just import them as script SRC?
> You can have js files where you put some general logic that you want to reuse, and that of course you can share. The rest cannot be shared, one works in the context of a browser hence the various browser DOM's, the other is in the context of Node and Node's object model and libraries.
>
> HTH,
>
> Julio
const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

let date_ob = new Date();

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World'+date_ob);
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
Well i understand howto "echo" information from server now, but i do not quite remember howto request things using client "browser".
I remember that i in PHP did fetch information from a database using forms and input fields that was dynamically created, so i must sent requests via javascript to server?
But i do not remember what such a call "request" looked like.

How would i done the above as a request, via a HTML page with script, for example a button push echoed answer to textarea?

Re: Node.js

<87wnmfap0m.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17353&group=comp.lang.javascript#17353

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Thu, 14 Oct 2021 11:18:01 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <87wnmfap0m.fsf@bsb.me.uk>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="fbb8bf2b600e85e3548ceab94cedde0b";
logging-data="24327"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DzMeMMO0Ds5Fpiw7MfY6S55JBwAQAZSI="
Cancel-Lock: sha1:3I4V4QeFfgM1FdF9Od6t8OEr3Wk=
sha1:e66LxPASZ2fpdX3rUCJxHc5ZaWg=
X-BSB-Auth: 1.e4fac36cb3a74f944dd8.20211014111801BST.87wnmfap0m.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 14 Oct 2021 10:18 UTC

Jonas Thörnvall <jonas.thornvall@gmail.com> writes:

>> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
>> > I finally decided "try" learn a little node.js.
>> > So i installed according to.
>> > https://nodejs.org/en/docs/guides/getting-started-guide/
>> >
>> > And simply copied app.js to my intetpub directory.

> I am not sure what braindead monkey wrote that intro but....
>
> "Now, run your web server using node app.js. Visit
> http://localhost:3000 and you will see a message saying "Hello World".

The phrase "run your web server using node app.js", with "node app.js"
highlighted so it is visually distinct form the English text, will be
understood by most readers to mean that you have to run a program (node)
passing it an argument (app.js) however it is that you do such things on
your system.

It's not absurd that you did not know what was meant, but it's very rude
to conclude that the fault is entirely that of the "braindead monkey"
who wrote this one-page quick guide.

--
Ben.

Re: Node.js

<30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17354&group=comp.lang.javascript#17354

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:1116:: with SMTP id e22mr6222134qty.78.1634214400415;
Thu, 14 Oct 2021 05:26:40 -0700 (PDT)
X-Received: by 2002:a54:4d9e:: with SMTP id y30mr12678925oix.50.1634214400165;
Thu, 14 Oct 2021 05:26:40 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 05:26:39 -0700 (PDT)
In-Reply-To: <87wnmfap0m.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<87wnmfap0m.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 12:26:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 38
 by: Jonas Thörnvall - Thu, 14 Oct 2021 12:26 UTC

torsdag 14 oktober 2021 kl. 12:18:05 UTC+2 skrev Ben Bacarisse:
> Jonas Thörnvall <jonas.t...@gmail.com> writes:
>
> >> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> >> > I finally decided "try" learn a little node.js.
> >> > So i installed according to.
> >> > https://nodejs.org/en/docs/guides/getting-started-guide/
> >> >
> >> > And simply copied app.js to my intetpub directory.
> > I am not sure what braindead monkey wrote that intro but....
> >
> > "Now, run your web server using node app.js. Visit
> > http://localhost:3000 and you will see a message saying "Hello World".
> The phrase "run your web server using node app.js", with "node app.js"
> highlighted so it is visually distinct form the English text, will be
> understood by most readers to mean that you have to run a program (node)
> passing it an argument (app.js) however it is that you do such things on
> your system.
>
> It's not absurd that you did not know what was meant, but it's very rude
> to conclude that the fault is entirely that of the "braindead monkey"
> who wrote this one-page quick guide.
>
> --
> Ben.
Well i am all about the easy way, both doing an explaining. But as you say run your webserver using node app.js just isn't sufficial.
At least run "node app.js" to make some context, because node is an executable and the argument passed is app.js.

So better yet would been run node.exe with parameter app.js from directory where app.js resides.
Well if "node.exe" path is known...

Ok braindead monkey was a bit harsch i really meant parrot LoL

Re: Node.js

<isqpvhFc4phU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17355&group=comp.lang.javascript#17355

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Thu, 14 Oct 2021 15:34:41 +0200
Lines: 54
Message-ID: <isqpvhFc4phU1@mid.individual.net>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net T4LemMAmAO2ZlthTiLJJJQMT7M01nxp1A0Q0tTrpoQdHiU7YCm
Cancel-Lock: sha1:xgPvus95eQgKoke1fVSSycqnus8=
In-Reply-To: <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
 by: Arno Welzel - Thu, 14 Oct 2021 13:34 UTC

Jonas Thörnvall:

[...]
> I am not sure what braindead monkey wrote that intro but....
>
> "Now, run your web server using node app.js. Visit
> http://localhost:3000 and you will see a message saying "Hello
> World". Refer to the Introduction to Node.js for a more comprehensive
> guide to getting started with Node.js."

Why do you say "braindead monkey"?

This is instruction is quite clear:

1) Run the command "node app.js" in your console

2) Open your browser and visit http://localhost:3000

> But i think he left out a couple of steps, like it should be run from
> commandline, i got it running now.

Of course! What else should "run your webserver using [node app.js]" mean?

> Is it something similar to PHP, must the whole code base "vanilla
> javascript" be generated dynamically thru the server? Or can i from
> the clientside script invole functionality from server?

Yes, Node.js runs completely on the server and *not* in the browser.
Furthermore Node.js applications are designed to run continously while
in PHP a script will only run once for the request then exit again (yes,
PHP-FPM will continue running and waiting for the next request from the
webserver but each PHP script will just be executed again for each
incoming HTTP request).

For example: The script app.js from
<https://nodejs.org/en/docs/guides/getting-started-guide/> will run as
long as you don't stop the "node" process.

The following function will handle all incoming requests from a browser:

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});

"req" is the request object which contains everything sent by the
browser and "res" is the response object which will generate the
response sent back to the browser.

--
Arno Welzel
https://arnowelzel.de

Re: Node.js

<isqq5aFc4phU2@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17356&group=comp.lang.javascript#17356

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Thu, 14 Oct 2021 15:37:46 +0200
Lines: 32
Message-ID: <isqq5aFc4phU2@mid.individual.net>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<87wnmfap0m.fsf@bsb.me.uk>
<30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Xp9qdSAInHRJzHYNRquvLAMI5pRV5kTc/J/0sYf9msvi5EuYmm
Cancel-Lock: sha1:TTdeQjTf95/SW7rz+uPKVVA1HbM=
In-Reply-To: <30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
 by: Arno Welzel - Thu, 14 Oct 2021 13:37 UTC

Jonas Thörnvall:

> torsdag 14 oktober 2021 kl. 12:18:05 UTC+2 skrev Ben Bacarisse:
>> Jonas Thörnvall <jonas.t...@gmail.com> writes:
>>
>>>> On Thursday, 14 October 2021 at 04:24:19 UTC+2,
>>>> jonas.t...@gmail.com wrote:
>>>>> I finally decided "try" learn a little node.js. So i
>>>>> installed according to.
>>>>> https://nodejs.org/en/docs/guides/getting-started-guide/
[...]
> Well i am all about the easy way, both doing an explaining. But as
> you say run your webserver using node app.js just isn't sufficial. At
> least run "node app.js" to make some context, because node is an
> executable and the argument passed is app.js.
>
> So better yet would been run node.exe with parameter app.js from
> directory where app.js resides. Well if "node.exe" path is known...

In Linux and macOS there is no "node.exe".

> Ok braindead monkey was a bit harsch i really meant parrot LoL

You should first try to LEARN how things work. And yes, this includes
the very very very BASICS what a command line is and how to set your
PATH if needed. And maybe you will even find out that using Linux or at
least WSL2 in Windows is usually MUCH easier than using Windows only.

--
Arno Welzel
https://arnowelzel.de

Re: Node.js

<isqqclFc77sU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17357&group=comp.lang.javascript#17357

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Thu, 14 Oct 2021 15:41:41 +0200
Lines: 35
Message-ID: <isqqclFc77sU1@mid.individual.net>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<59c3716a-2c09-432c-8822-06b48a007bb2n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net pQaU9xwgmqtp3vIziYSztg5/7ad8gnX2444Da7yHuirG5W3zH6
Cancel-Lock: sha1:AdSnVWuFd0QRtXwOuKz+jiRdbZc=
In-Reply-To: <59c3716a-2c09-432c-8822-06b48a007bb2n@googlegroups.com>
 by: Arno Welzel - Thu, 14 Oct 2021 13:41 UTC

Jonas Thörnvall:

> Well i understand howto "echo" information from server now, but i do
> not quite remember howto request things using client "browser". I

Then learn it!

The things you need to understand:

- HTTP
- URL
- query parameters
- CGI

> remember that i in PHP did fetch information from a database using
> forms and input fields that was dynamically created, so i must sent
> requests via javascript to server? But i do not remember what such a
> call "request" looked like.

You just send a request with your browser and the server will process
it. This request can be:

- URL with or without any query parameter (<a href="...">...</a>).
- A form which gets submitted (<form action="..." ...></form>)
- An XHR request using JavaScript
> How would i done the above as a request, via a HTML page with script,
> for example a button push echoed answer to textarea?

Go and get a book about how HTTP, CGI etc. works. To explain this *here*
is WAY OFF TOPIC!

--
Arno Welzel
https://arnowelzel.de

Re: Node.js

<93ed9749-367d-4f39-99ad-4bb1848cbde8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17358&group=comp.lang.javascript#17358

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:6214:5282:: with SMTP id kj2mr481855qvb.5.1634220133096;
Thu, 14 Oct 2021 07:02:13 -0700 (PDT)
X-Received: by 2002:a05:6830:57d:: with SMTP id f29mr2696058otc.285.1634220132732;
Thu, 14 Oct 2021 07:02:12 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 07:02:12 -0700 (PDT)
In-Reply-To: <isqqclFc77sU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <59c3716a-2c09-432c-8822-06b48a007bb2n@googlegroups.com>
<isqqclFc77sU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <93ed9749-367d-4f39-99ad-4bb1848cbde8n@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 14:02:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 35
 by: Jonas Thörnvall - Thu, 14 Oct 2021 14:02 UTC

torsdag 14 oktober 2021 kl. 15:41:46 UTC+2 skrev Arno Welzel:
> Jonas Thörnvall:
> > Well i understand howto "echo" information from server now, but i do
> > not quite remember howto request things using client "browser". I
> Then learn it!
>
> The things you need to understand:
>
> - HTTP
> - URL
> - query parameters
> - CGI
> > remember that i in PHP did fetch information from a database using
> > forms and input fields that was dynamically created, so i must sent
> > requests via javascript to server? But i do not remember what such a
> > call "request" looked like.
> You just send a request with your browser and the server will process
> it. This request can be:
>
> - URL with or without any query parameter (<a href="...">...</a>).
> - A form which gets submitted (<form action="..." ...></form>)
> - An XHR request using JavaScript
> > How would i done the above as a request, via a HTML page with script,
> > for example a button push echoed answer to textarea?
> Go and get a book about how HTTP, CGI etc. works. To explain this *here*
> is WAY OFF TOPIC!
> --
> Arno Welzel
> https://arnowelzel.de
Well evidently the requests was simpler then i expected/remember.
So i just make a form and send the request, can't quite remember hot it is piped back to form though.
I will have to read up, looking at examples "no matter how crazy LoL".

Re: Node.js

<87r1cnaelt.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17359&group=comp.lang.javascript#17359

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Thu, 14 Oct 2021 15:02:54 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <87r1cnaelt.fsf@bsb.me.uk>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<87wnmfap0m.fsf@bsb.me.uk>
<30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="fbb8bf2b600e85e3548ceab94cedde0b";
logging-data="14062"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RtcfPyqJudJbS680gybp8jAjKMomZDJg="
Cancel-Lock: sha1:ByubS3fYQnOMEa/xBtaWmBuWI3k=
sha1:omzkQmWdMc0giYlow3rxnEVzVYw=
X-BSB-Auth: 1.69498bed00ad70e80a22.20211014150254BST.87r1cnaelt.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 14 Oct 2021 14:02 UTC

Jonas Thörnvall <jonas.thornvall@gmail.com> writes:

> torsdag 14 oktober 2021 kl. 12:18:05 UTC+2 skrev Ben Bacarisse:
>> Jonas Thörnvall <jonas.t...@gmail.com> writes:
>>
>> >> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
>> >> > I finally decided "try" learn a little node.js.
>> >> > So i installed according to.
>> >> > https://nodejs.org/en/docs/guides/getting-started-guide/
>> >> >
>> >> > And simply copied app.js to my intetpub directory.
>> > I am not sure what braindead monkey wrote that intro but....
>> >
>> > "Now, run your web server using node app.js. Visit
>> > http://localhost:3000 and you will see a message saying "Hello World".
>> The phrase "run your web server using node app.js", with "node app.js"
>> highlighted so it is visually distinct form the English text, will be
>> understood by most readers to mean that you have to run a program (node)
>> passing it an argument (app.js) however it is that you do such things on
>> your system.
>>
>> It's not absurd that you did not know what was meant, but it's very rude
>> to conclude that the fault is entirely that of the "braindead monkey"
>> who wrote this one-page quick guide.
>
> Well i am all about the easy way, both doing an explaining. But as you
> say run your webserver using node app.js just isn't sufficial.

I didn't think that that is what I said.

> At least run "node app.js" to make some context, because node is an
> executable and the argument passed is app.js.

That's what the coloured background is supposed to suggest. There's no
obvious reason to suppose that quotes are clearer, especially as if you
were to actually write the quotes it would not work.

> So better yet would been run node.exe with parameter app.js from
> directory where app.js resides.

Except that would be confusing when the program is called node rather
than node.exe. As you can see, it's not easy to cater for every
possible misunderstanding.

--
Ben.

Re: Node.js

<2d12d78f-74a8-4d09-8ec4-80a5a876454fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17360&group=comp.lang.javascript#17360

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:34b:: with SMTP id t11mr5114932qkm.114.1634222240333;
Thu, 14 Oct 2021 07:37:20 -0700 (PDT)
X-Received: by 2002:a4a:a6cc:: with SMTP id i12mr4421332oom.59.1634222240039;
Thu, 14 Oct 2021 07:37:20 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 07:37:19 -0700 (PDT)
In-Reply-To: <87r1cnaelt.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<87wnmfap0m.fsf@bsb.me.uk> <30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
<87r1cnaelt.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2d12d78f-74a8-4d09-8ec4-80a5a876454fn@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 14:37:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: Jonas Thörnvall - Thu, 14 Oct 2021 14:37 UTC

torsdag 14 oktober 2021 kl. 16:02:59 UTC+2 skrev Ben Bacarisse:
> Jonas Thörnvall <jonas.t...@gmail.com> writes:
>
> > torsdag 14 oktober 2021 kl. 12:18:05 UTC+2 skrev Ben Bacarisse:
> >> Jonas Thörnvall <jonas.t...@gmail.com> writes:
> >>
> >> >> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> >> >> > I finally decided "try" learn a little node.js.
> >> >> > So i installed according to.
> >> >> > https://nodejs.org/en/docs/guides/getting-started-guide/
> >> >> >
> >> >> > And simply copied app.js to my intetpub directory.
> >> > I am not sure what braindead monkey wrote that intro but....
> >> >
> >> > "Now, run your web server using node app.js. Visit
> >> > http://localhost:3000 and you will see a message saying "Hello World".
> >> The phrase "run your web server using node app.js", with "node app.js"
> >> highlighted so it is visually distinct form the English text, will be
> >> understood by most readers to mean that you have to run a program (node)
> >> passing it an argument (app.js) however it is that you do such things on
> >> your system.
> >>
> >> It's not absurd that you did not know what was meant, but it's very rude
> >> to conclude that the fault is entirely that of the "braindead monkey"
> >> who wrote this one-page quick guide.
> >
> > Well i am all about the easy way, both doing an explaining. But as you
> > say run your webserver using node app.js just isn't sufficial.
> I didn't think that that is what I said.
> > At least run "node app.js" to make some context, because node is an
> > executable and the argument passed is app.js.
> That's what the coloured background is supposed to suggest. There's no
> obvious reason to suppose that quotes are clearer, especially as if you
> were to actually write the quotes it would not work.
> > So better yet would been run node.exe with parameter app.js from
> > directory where app.js resides.
> Except that would be confusing when the program is called node rather
> than node.exe. As you can see, it's not easy to cater for every
> possible misunderstanding.
>
> --
> Ben.
Ok let settle for "run" so that the reader understand it is an executable binary "running in some environment"
I think use and webserver is vague in this context.

Re: Node.js

<2bce9e78-34db-4e76-864c-1b61cfb6a6fan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17361&group=comp.lang.javascript#17361

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:622a:5c8:: with SMTP id d8mr2164269qtb.63.1634222809159;
Thu, 14 Oct 2021 07:46:49 -0700 (PDT)
X-Received: by 2002:a9d:69c9:: with SMTP id v9mr2863472oto.127.1634222808565;
Thu, 14 Oct 2021 07:46:48 -0700 (PDT)
Path: rocksolid2!news.neodome.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 07:46:48 -0700 (PDT)
In-Reply-To: <2d12d78f-74a8-4d09-8ec4-80a5a876454fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<87wnmfap0m.fsf@bsb.me.uk> <30351810-4bdc-416a-8cb9-3acc945a7542n@googlegroups.com>
<87r1cnaelt.fsf@bsb.me.uk> <2d12d78f-74a8-4d09-8ec4-80a5a876454fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2bce9e78-34db-4e76-864c-1b61cfb6a6fan@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Thu, 14 Oct 2021 14:46:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jonas Thörnvall - Thu, 14 Oct 2021 14:46 UTC

torsdag 14 oktober 2021 kl. 16:37:24 UTC+2 skrev Jonas Thörnvall:
> torsdag 14 oktober 2021 kl. 16:02:59 UTC+2 skrev Ben Bacarisse:
> > Jonas Thörnvall <jonas.t...@gmail.com> writes:
> >
> > > torsdag 14 oktober 2021 kl. 12:18:05 UTC+2 skrev Ben Bacarisse:
> > >> Jonas Thörnvall <jonas.t...@gmail.com> writes:
> > >>
> > >> >> On Thursday, 14 October 2021 at 04:24:19 UTC+2, jonas.t...@gmail.com wrote:
> > >> >> > I finally decided "try" learn a little node.js.
> > >> >> > So i installed according to.
> > >> >> > https://nodejs.org/en/docs/guides/getting-started-guide/
> > >> >> >
> > >> >> > And simply copied app.js to my intetpub directory.
> > >> > I am not sure what braindead monkey wrote that intro but....
> > >> >
> > >> > "Now, run your web server using node app.js. Visit
> > >> > http://localhost:3000 and you will see a message saying "Hello World".
> > >> The phrase "run your web server using node app.js", with "node app.js"
> > >> highlighted so it is visually distinct form the English text, will be
> > >> understood by most readers to mean that you have to run a program (node)
> > >> passing it an argument (app.js) however it is that you do such things on
> > >> your system.
> > >>
> > >> It's not absurd that you did not know what was meant, but it's very rude
> > >> to conclude that the fault is entirely that of the "braindead monkey"
> > >> who wrote this one-page quick guide.
> > >
> > > Well i am all about the easy way, both doing an explaining. But as you
> > > say run your webserver using node app.js just isn't sufficial.
> > I didn't think that that is what I said.
> > > At least run "node app.js" to make some context, because node is an
> > > executable and the argument passed is app.js.
> > That's what the coloured background is supposed to suggest. There's no
> > obvious reason to suppose that quotes are clearer, especially as if you
> > were to actually write the quotes it would not work.
> > > So better yet would been run node.exe with parameter app.js from
> > > directory where app.js resides.
> > Except that would be confusing when the program is called node rather
> > than node.exe. As you can see, it's not easy to cater for every
> > possible misunderstanding.
> >
> > --
> > Ben.
> Ok let settle for "run" so that the reader understand it is an executable binary "running in some environment"
> I think use and webserver is vague in this context.
run "node" from commandline/shell with "app.js" as argument/parameter would been nice.... in this context...

Re: Node.js

<01c6ae2d-83a2-4381-96f6-deb42e848581n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17365&group=comp.lang.javascript#17365

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:9f12:: with SMTP id i18mr8780474qke.418.1634281140891;
Thu, 14 Oct 2021 23:59:00 -0700 (PDT)
X-Received: by 2002:aca:b186:: with SMTP id a128mr16738357oif.48.1634281140695;
Thu, 14 Oct 2021 23:59:00 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Thu, 14 Oct 2021 23:59:00 -0700 (PDT)
In-Reply-To: <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.101.110; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.101.110
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <01c6ae2d-83a2-4381-96f6-deb42e848581n@googlegroups.com>
Subject: Re: Node.js
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Fri, 15 Oct 2021 06:59:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 53
 by: Julio Di Egidio - Fri, 15 Oct 2021 06:59 UTC

On Thursday, 14 October 2021 at 10:27:12 UTC+2, jonas.t...@gmail.com wrote:
> torsdag 14 oktober 2021 kl. 09:12:43 UTC+2 skrev ju...@diegidio.name:
<snip>
> "Now, run your web server using node app.js. Visit http://localhost:3000 and you will see a message saying "Hello World".
> Refer to the Introduction to Node.js for a more comprehensive guide to getting started with Node.js."
>
> But i think he left out a couple of steps, like it should be run from commandline, i got it running now.

That is *obvious* to anyone who knows what s/he is doing, and was written as it customarily is. You are simply and utterly incompetent, and this at least should be obvious even to you.

> Is it something similar to PHP, must the whole code base "vanilla javascript" be generated dynamically thru the server?

No: as IIS can serve static files, so can your Node app.

> Or can i from the clientside script invole functionality from server?

Sure, as usual. The point is, server-side vs client-side, the two realms are independent, just one calls the other. And, just like you would not mix (in your mind to begin with) PHP on the server-side with JS on the client-side, so now you don't confuse the JS on the server-side with the JS on the client-side... But keep also in mind that while PHP is the scripting language and IIS (or Apache, etc.) does all the work, here you write at least part of the code that does what IIS itself does.

> For example have a "vanilla script" ask a "node.js" server script what time it is from "browser script"?

Besides that "vanilla script" rather hints at those files with logic that can be used in any context. Then again that works as usual: open a link, submit a form, send an ajax request, include a script...

Now, I am not saying it is trivial, there are even many professionals who can't keep such distinctions really straight and put stuff all in the wrong places: React for the client-side is nowadays a topical example of an institutionalised layering fuck-up. Anyway, that's another story and you needn't make the same mistakes...

> I just try to get a hang out of how you use it, i do not exactly remember how PHP did work but i think it mostly was generated dynamically at server, and you sent request strings?

Go through Node's tutorials one at a time and eventually you'll get there. By trial and error, which includes just looking up examples, in 10 years you'll still be wandering.

Have fun,

Julio

Re: Node.js

<8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17369&group=comp.lang.javascript#17369

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:7763:: with SMTP id h3mr17042982qtu.159.1634346766898;
Fri, 15 Oct 2021 18:12:46 -0700 (PDT)
X-Received: by 2002:a4a:5549:: with SMTP id e70mr11409775oob.81.1634346766493;
Fri, 15 Oct 2021 18:12:46 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 15 Oct 2021 18:12:46 -0700 (PDT)
In-Reply-To: <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=32.216.227.57; posting-account=soEzFAoAAAA9UnLg4OfAIq1tieDGxldE
NNTP-Posting-Host: 32.216.227.57
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com>
Subject: Re: Node.js
From: scott.sauyet@gmail.com (Scott Sauyet)
Injection-Date: Sat, 16 Oct 2021 01:12:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Scott Sauyet - Sat, 16 Oct 2021 01:12 UTC

Every now and then I ask myself why I stopped actively participating in
comp.lang.javascript...

jonas.thornvall@gmail.com wrote:
> I am not sure what braindead monkey wrote that intro but....
>
> "Now, run your web server using node app.js. Visit http://localhost:3000
> and you will see a message saying "Hello World". [ ... ]
>
> But i think he left out a couple of steps, like it should be run from
> commandline, i got it running now.

.... Then I remember.

:-(

-- Scott

Re: Node.js

<61ee363d-f7fe-47ce-986c-c46240a30207n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17370&group=comp.lang.javascript#17370

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a0c:fad0:: with SMTP id p16mr14749860qvo.3.1634350698463;
Fri, 15 Oct 2021 19:18:18 -0700 (PDT)
X-Received: by 2002:a05:6830:1ad5:: with SMTP id r21mr11464286otc.192.1634350698229;
Fri, 15 Oct 2021 19:18:18 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Fri, 15 Oct 2021 19:18:17 -0700 (PDT)
In-Reply-To: <8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <61ee363d-f7fe-47ce-986c-c46240a30207n@googlegroups.com>
Subject: Re: Node.js
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sat, 16 Oct 2021 02:18:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 23
 by: Jonas Thörnvall - Sat, 16 Oct 2021 02:18 UTC

lördag 16 oktober 2021 kl. 03:12:51 UTC+2 skrev Scott Sauyet:
> Every now and then I ask myself why I stopped actively participating in
> comp.lang.javascript...
> jonas.t...@gmail.com wrote:
> > I am not sure what braindead monkey wrote that intro but....
> >
> > "Now, run your web server using node app.js. Visit http://localhost:3000
> > and you will see a message saying "Hello World". [ ... ]
> >
> > But i think he left out a couple of steps, like it should be run from
> > commandline, i got it running now.
> ... Then I remember.
>
> :-(
>
> -- Scott
To be honest Scott i am a bit surprised they chosed the same extension for serverside and clientside javascript.
And with phrases like "use" one have to be clairvoyant to know what to do.

JT

Re: Node.js

<slrnsmlqgl.851.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17371&group=comp.lang.javascript#17371

  copy link   Newsgroups: comp.lang.javascript
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+usenet@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.javascript
Subject: Re: Node.js
Date: Sat, 16 Oct 2021 15:04:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <slrnsmlqgl.851.jon+usenet@raven.unequivocal.eu>
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com>
<c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com>
Injection-Date: Sat, 16 Oct 2021 15:04:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="047cc29266f15ea92049665d777a2c3d";
logging-data="21014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EgL/OvLIzeJyAVhUDiM4z1ga7F7OHwDA="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:EgF4xW5u02cisCBXzD1icdkDggw=
 by: Jon Ribbens - Sat, 16 Oct 2021 15:04 UTC

On 2021-10-16, Scott Sauyet <scott.sauyet@gmail.com> wrote:
> Every now and then I ask myself why I stopped actively participating in
> comp.lang.javascript...
>
> jonas.thornvall@gmail.com wrote:
>> I am not sure what braindead monkey wrote that intro but....
>>
>> "Now, run your web server using node app.js. Visit http://localhost:3000
>> and you will see a message saying "Hello World". [ ... ]
>>
>> But i think he left out a couple of steps, like it should be run from
>> commandline, i got it running now.
>
> ... Then I remember.
>
>:-(

It's ok with an appropriate kill-file...

Re: Node.js

<b35131c1-79ad-4edd-baad-5d3ab31e865an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17373&group=comp.lang.javascript#17373

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a37:8ec6:: with SMTP id q189mr3775245qkd.145.1634710193196;
Tue, 19 Oct 2021 23:09:53 -0700 (PDT)
X-Received: by 2002:aca:1808:: with SMTP id h8mr7846266oih.54.1634710192997;
Tue, 19 Oct 2021 23:09:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Tue, 19 Oct 2021 23:09:52 -0700 (PDT)
In-Reply-To: <slrnsmlqgl.851.jon+usenet@raven.unequivocal.eu>
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.96.50; posting-account=F3H0JAgAAADcYVukktnHx7hFG5stjWse
NNTP-Posting-Host: 93.41.96.50
References: <5f57e300-fd03-466c-96af-75fd67f72420n@googlegroups.com>
<c8cfb8c6-deed-4d1f-846d-257b942c79d9n@googlegroups.com> <c9ae1e2b-73b7-4f49-9588-954c2fd7b2f7n@googlegroups.com>
<8f1011b7-db1e-4cfd-b6dc-65e3a6a979cdn@googlegroups.com> <slrnsmlqgl.851.jon+usenet@raven.unequivocal.eu>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b35131c1-79ad-4edd-baad-5d3ab31e865an@googlegroups.com>
Subject: Re: Node.js
From: julio@diegidio.name (Julio Di Egidio)
Injection-Date: Wed, 20 Oct 2021 06:09:53 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Julio Di Egidio - Wed, 20 Oct 2021 06:09 UTC

On Saturday, 16 October 2021 at 17:05:01 UTC+2, Jon Ribbens wrote:
> On 2021-10-16, Scott Sauyet <scott....@gmail.com> wrote:
> > Every now and then I ask myself why I stopped actively participating in
> > comp.lang.javascript...
> >
> > jonas.t...@gmail.com wrote:
> >> I am not sure what braindead monkey wrote that intro but....
> >>
> >> "Now, run your web server using node app.js. Visit http://localhost:3000
> >> and you will see a message saying "Hello World". [ ... ]
> >> But i think he left out a couple of steps, like it should be run from
> >> commandline, i got it running now.
> >
> > ... Then I remember.
> >
> >:-(
> It's ok with an appropriate kill-file...

Which you post after some technical explanation were given.

Stupid sucking cunts and the pollution of all ponds...

Eat shit and die.

*Plonk*

Julio


devel / comp.lang.javascript / Node.js

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor