serverside-javascript

Can you call COM components from server side javascript?

一个人想着一个人 提交于 2019-12-06 09:04:39
Is it possible (using one of the server side implementations of javascript .. see http://www.nakedjavascript.com/getting-started-55 ) to instantiate a COM object and invoke methods on it? idobatter There is node-win32ole ( npm install win32ole ). That depends on which server-side implementation you’re using. When using ASP/JS (or any other framework using Microsoft’s Windows Scripting engine), that’s not a problem using the ActiveXObject constructor. When using JSDB , you can use the ActiveX constructor. Node.js doesn’t really work on Windows, only thru Cygwin, so ActiveX probably won’t be

Interpreting JavaScript in PHP

怎甘沉沦 提交于 2019-12-03 23:48:39
I'd like to be able to run JavaScript and get the results with PHP and is wondering if there is a library for PHP that allows me to parse it out. My first thought was to use node.js, but since node.js has access to sockets, files and things I think I'd prefer to avoid that. Rationale: I'm doing screen scraping in PHP and have encountered many scenarios where the data is being produced by JavaScript on the frontend, and I would like to avoid writing specialized filtering functions to act on the JavaScript on a per-case basis since that takes a lot of time. The more general case would be to

why server side Javascript is not widely used? [closed]

一笑奈何 提交于 2019-12-03 11:10:58
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. we know JavaScript is one of the most popular and widely used language in front end.i wonder it is not widely used in back end ? It's becoming more widely used thanks to Google's V8 engine. Take a look at Node.js . I think poor performance limited it's

How to debug and log own code on the server side of Meteor?

会有一股神秘感。 提交于 2019-12-03 09:42:57
问题 Never mind. The reason this did not work: I forgot to meteor reset so debugger did not get a chance to stop. Duh! More info: I am using the method in the answer by Mason Chang to the related question, not the kill -s USR1 [proc_id] (where I could see the scripts, but not able to stop in the startup() function.). Also, I am using meteorite. I am trying to debug the Meteor.startup(function ()) code on Meteor server side (i.e., under /server ) with node-inspector, I have read this question, and

Confusion about CPU intensive code in Node.js

﹥>﹥吖頭↗ 提交于 2019-12-03 06:51:05
问题 A question regarding "everything runs in parallel except your code" from someone new to Node.js. This is an obviously artificial example, but let's say I want to create a math library containing a function factorize() which behaves as follows: var http = require('http'); http.createServer(function (req, res) { myMath.factorize(some_big_number,function(factors) { res.writeHead(200, {'Content-Type': 'application/json'}); res.end(JSON.stringify(factors)); } }).listen(8000); How can this be

Best server-side javascript servers [closed]

我们两清 提交于 2019-12-03 04:56:06
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js

How to debug and log own code on the server side of Meteor?

你。 提交于 2019-12-03 01:13:37
Never mind. The reason this did not work: I forgot to meteor reset so debugger did not get a chance to stop. Duh! More info: I am using the method in the answer by Mason Chang to the related question, not the kill -s USR1 [proc_id] (where I could see the scripts, but not able to stop in the startup() function.). Also, I am using meteorite. I am trying to debug the Meteor.startup(function ()) code on Meteor server side (i.e., under /server ) with node-inspector, I have read this question , and following the answer to change run.js , but somehow, my own script for the startup function does not

Upload file using NodeJS and node-formidable

狂风中的少年 提交于 2019-12-02 19:36:16
I succeed uploading file using node.js and the formidable module yet, the file that got save on the disk is in some kind of a bad format ( bad encoding) e.g. if I upload an image I can't view it, if I upload a txt file gedit provide the following msg: "gedit has not been able to detect the character encoding. Please check that you are not trying to open a binary file. Select a character encoding from the menu and try again." here is the code: form.encoding = 'utf-8'; form.parse(req, function(err, fields, files) { fs.writeFile('test.js', files.upload,'utf8', function (err) { if (err) throw err;

Confusion about CPU intensive code in Node.js

对着背影说爱祢 提交于 2019-12-02 19:26:05
A question regarding "everything runs in parallel except your code" from someone new to Node.js. This is an obviously artificial example, but let's say I want to create a math library containing a function factorize() which behaves as follows: var http = require('http'); http.createServer(function (req, res) { myMath.factorize(some_big_number,function(factors) { res.writeHead(200, {'Content-Type': 'application/json'}); res.end(JSON.stringify(factors)); } }).listen(8000); How can this be written so that it will "run in parallel"? I've been looking at the parsing code from this library as an

Javascript server side?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 19:08:24
问题 Is it at all possible to use javascript server side and thus not shown in page source for certain core calculations? I'm developing a game, and one crucial part of the code needs to be only calculated server side then passed back to client. My entire game is in Javascript - but most of it is client side which is fine except this one particular function which needs to hidden from view to prevent cheats. Is this possible - if so how would I set up server side JS ? 回答1: You'll want to look at