setup cloud code for Parse.com - javascript

I have gone through the instruction found on Parse.com to setup Cloud code. I downloaded exe file as instructed in 1. It seems like there is a step missing before step 2.
When i run "parse new" in the command prompt i get "not recognized as an internal or external command". What am i missing? How do i install/use cloud code?
Get the Parse tool
The Parse command line tool for Windows is available here. Download
the Windows executable named: parse.exe at this link. Note that this
is not an installer, it is just a plain Windows executable.
Set up a Cloud Code directory.
From the Command Prompt, run the command parse new and follow
instructions. In this quickstart we'll see how to set up your server
code on Heroku. Please read docs for more details.

I just downloaded the parse CLI on my Windows desktop to figure it out and I believe I've found your solution.
You need to open up a standard command line on windows and then navigate to where you have stored parse.exe. Once the command line is at the same directory as the exe, you will be able to run parse new and any of the other CLI commands.
For example, you could do the following:
Hit the Windows key (or start menu) and search "cmd" then hit enter to open the command line
Navigate to where parse.exe is located. If it's on your desktop, it could be something along the lines of cd C:\Users\<name>\Desktop
parse help, parse new and so on should now work from this directory
The documentation feels a bit vague and could use some clarification for the Windows platform. Hope this helps!

Related

Error when trying to run JS in VScode for the first time (newbie)

So i just installed VScode on my Windows 10. I keep getting the following error:
"Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json"
I've tried reinstalling VS and rebooting, tried installing from different folders (both on C drive and the second time i added it to my programs folder)
I tried installing a node.js extension which fails every time and then prompts me to try it manually...which then leads to a file downloading automatically, but when i add it to my VS folder through my file explorer, nothing happens still.
I tried installed a different node.js debugger
I tried changing my debugger to chrome too but all it does is take me to localhost:8080 and an empty page of course.
When i go through file explorer and look through the path of my .vscode folder, the nightly extension (node.js) is there....
I'm new to VScode and have just been using Scrimba's terminal to do my code but decided to try something more professional
I think you're putting node.js in the same folder/path as .vscode, this isn't correct. What you need to do is set node.js in your PATH which is different. See this answer for more information on how to set PATH/environment variables. Also install it from the official website nodejs.org. After changing your PATH remember to reboot.
I wouldn't recommend downloading "node.js extensions" as those likely are not legitimate, and as you've said yourself they don't work. Only download from the official website.
You have to install nodes from this website https://nodejs.org/

Unable to Run JavaScript in Atom with Script package

I am trying to run JavaScript code in Atom with Script package. It can run Python successfully, but with JS files it gives the following error message:
The system cannot find the file specified.
I had the same problem while analyzing some JavaScript code of an extension for Chrome.
Using: Windows 7 64Bit Atom:1.24.0 x64
Since I my coding Folder is somewhere else I copied the files in that folder. Let’s say:
C:\Users\USER\CodingStuff\
then it started working. I have also tried adding the extension file the Sources via:
1 - CTRL+SHIFT+I
2- Right click -> add folder to workspace
But that did not work.
Side note: node.js has to be installed on the system.
Hope it helps.
I know I am late, but if any other faces the same issue, my answer will be helpful.
Assumed that you want to run your javascript outside browser and you installed node.js.
There is a bug in "script" package of Atom. Check ur path of the script if there are spaces then this leads to the aforementioned error. Work around is remove spaces.
for ex:
E:\Java script\trial.js
change to:
E:\Javascript\trial.js

Azure Functions: How to debug in WebStorm?

The azure-functions-cli offers a way to kickoff debugging, but these instructions seem to be Visual Studio specific.
I tried using a similar trick to serverless by setting up a run config in WebStorm to point the JavaScript file to:
\node_modules\azure-functions-cli\lib\main.js
And then passing the Application args:
run myFunctionName --debug
This successfully runs the functions with Azure's tools, but both WebStorm tries to set a debugging port; and when the Azure window opens up it sets its own debugging port.
From Webstorm:
C:\Program Files (x86)\JetBrains\WebStorm 2016.2.3\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" --debug-brk=60168 --expose_debug_as=v8debug C:\Users\username\AppData\Roaming\npm\node_modules\azure-functions-cli\lib\main.js run myfunction --debug
Debugger listening on [::]:60168
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException:
Likewise, Azure-cli says it opens a debugging port, but they do not match.
As a result, breakpoints set are ignored when the functions are called (Though it does successfully run).
Anybody know how to configure this properly to be able to use WebStorm to debug?
Azure-Functions-CLI was renamed to azure-functions-core-tools. If you still have the Azure-Functions-CLI see my legacy response at the end of this post.
If you're running the new azure-functions-core-tools it looks like they broke the capability to run a remote debugger :-(.
I have the following issue opened and I will update if they tell me otherwise:
https://github.com/Azure/azure-functions-core-tools/issues/378
Fortunately, the new Beta version of the azure-functions-core tools doesn't have all of this C# craziness that prevents it from running on other OSes and requires a remote debugger. To install that version, you can use:
npm i -g azure-functions-core-tools#core
With that version installed, you can launch things with the good 'ol standard Node runtime.
Within WebStorm from Run -> Edit Configurations create a new "Node.JS".
Give the debugging some type of name.
Set the JavaScript file to:
~\AppData\Roaming\npm\node_modules\azure-functions-core-tools\lib\main.js
NOTE: The above assume you installed Azure Functions on a Windows machine with the global flag.
Set the Application Parameters to: start --debug VSCODE
Edit the file ".vscode\launch.json" and change the debug port to 9229 for node.
Within WebStorm choose Run-> Debug:"What_You_Named_the_Remote_Profile"
Add some breakpoints.
Navigate to your API end-point and see that the break-points work.
NOTE: By default it appears the function will be at http://localhost:7071/api/functionName
------------------- EDITED But Below Held for Posterity --------------
Okay, it looks like you can not do this with local debugging, but can with "Remote Debugging" within WebStorm.
Within WebStorm from Run -> Edit Configurations create a new "Node.JS Remote Debug".
Give the debugging some type of name.
Hit the + Sign where it says, "Before Launch: External Tool" and choose "Run External Tool".
Hit the + Sign again and fill it out like the screen-shot (This is assuming you installed the Azure Function CLI globally).
NOTE: The above screenshot has been updated based on the latest version of Azure Functions CLI/. Earlier versions required you to state an app name, and did not require --debug to debug. As a result if you are not updated to the latest version of Azure Functions CLI (now known as Azure-Functions-Core-Tools) you may need to have "run MyApp" in the Parameters field.
Within WebStorm choose Run-> Debug:"What_You_Named_the_Remote_Profile"
Add some breakpoints.
Navigate to your API end-point and see that the break-points work.
NOTE: By default it appears the function will be at http://localhost:7071/api/functionName
Add this to your local.setting.json file under values: "languageWorkers:node:arguments": "--inspect=5858"
Click Edit configuration. Click the plus icon and choose Attachto Node.js/Chrome
Fill in these values for the options: host: localhost - Port: 5858 and set Attac to option to "Crhome or Nod.js>6.3 started with --inpect"
Start the function and run the debugger
See this picture: https://i.stack.imgur.com/hnC74.png

How to debug node.js application with Visual Studio 2013 and Node Tools NTVS

I have moved an existing node.js + express project to VS because I prefer the IDE over JetBrains for now (used VS for years, only peeked into Webstorm).
I used NTVS new project->from existing sources and all files were imported successfully.
Afterwards, I opened the project settings of my project and set the node.exe arguments to bin\www, startup file for express.
When I press F5 (debug) I get the console.log messages I have put into the www and app.js files in the opening command prompt, and it looks like the server is running (cannot confirm, I want to debug if everything is working), but the VS debugger directly exits again, it also does not open any page in the browser I selected for debugging.
My node app actually is a REST webservice, so I want to test different URLs with different parameters.
Also, I cannot access the app on the port I specified, though when I directly start it from node.exe I can, even though the command prompt is still open.
(I have NTVS and WebEssentials installed - some operations take a long long time, but I attribute this to NTVS being still an early version.)
Question: how does the Visual Studio debugger stay connected to the node.js application so I can use breakpoints and use any browser then to connect and test different URLs? (Even a breakpoint put on the console.log that gets printed during startup is not being triggered.)
For everyone who asks receives, and the one who searches finds....
(and yes, I did spend a long time searching and trying before posting here..)
Kind of nice to debug node.js server with VS..
hope this helps someone
Edit: The arguments to node.exe can be hard to read in the image. It must be
--debug=<portno>
that is with two dashes (and not just one) to specify the debug port.
Not so much knowledge on expressjs but with a recent release of NTVS 1.0 Alpha, I did find it supports remote debugging which can be also used to debug nodejs app running locally - anyway haven't tried if it works with nodejs app + expressjs but it should.
I followed the step in this video https://youtu.be/-ir9ZB8lUg4 which is
Run your nodejs with node.exe RemoteDebug.js <your_javascript_file>.
RemoteDebug.js has come when you install NTVS.
In Visual Studio, select Debug > Attach to Process
Select Node.js remote debugging for Transport
Enter localhost:5859 for Qualifier
Click Attach
This will put Visual Studio in debugging mode which you can set a breakpoint, do step-in/step-out, very same experience when you use VS to debug .NET app.
Its pretty straight forward with NTVS, you can download required version for your windows from github here
Once you install NTVS, NodeJS project templates will be added
Now, Goto File->New project -> Basic NodeJS Express 3 application (it will be available in javascript project templates)
Now just goto debug and select Start Debugging, add breakpoints where ever required and you can start debugging

Is there a way to run JavaScript code inside Aptana Studio 3 IDE?

I created a Test.js file and wrote two lines of JS code in it:
var a = 5;
console.log("The result is = " + a);
The output should be:
"The result is = 5"
Is there a way I can see this in Aptana Scripting console, instead of integrating the JS code in a HTML file and saving/refreshing it?
Can any other IDE, say Netbeans help, if not Aptana?
Any advise would be highly appreciated.
Regards
Roy
I think that it would be best if you give Node.js a try. This way, you get to call node test.js on a console window and see the result.
I'm pretty sure that console is meant for viewing the output of Aptana's Ruby-based commands (installed under the Commands menu). It might be possible to follow the instructions here: http://www.chromium.org/for-testers/enable-logging and then tail the resulting log file in a Terminal panel (not the same as a console window).
I'm afraid it is not possible.
But What I did was to setup a simple workbench.html file, where in the header I put
[...]
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/myJsFile.js"></script>
and then modified the myJsFile.js and saved it.
Another very intersting possibility is given by http://www.developer.nokia.com/Community/Wiki/Aptana_WRT_Plugin:_Displaying_log_messages_in_Output_console
just check it
It's not exactly what you asked, but it might point you in the right direction. There's a project called EclipseMonkey ... I'm not sure the status. Here's a working (?) example. Your mileage will vary. http://blogs.edgehill.ac.uk/webservices/2008/10/16/aptana-outline-auto-expansion-monkeyed/
What you can do is you can download node.js from node.js, download the package and follow the installation instructions on the screen.
If using a Windows, the node.js package comes with its own interactive command prompt which you can open. To run a js file on windows, open the windows command prompt, type in node, then the name of your file e.g. test.js. Node.js should run your file.
If using a Mac, the node.js package runs through the terminal application on the mac. To run a file, type in node, then the name of your file e.g. test.js, node.js should run the file.
Aptana Studio 3 has the ability to open the terminal inside the IDE itself. Save your file in Aptana Studio and follow the instructions to run a file on the mac.
By the way, keep your files labelled in lowercase letters, I tried using Uppercase for the first letter and it did not work.
Hope that helps.

Categories

Resources