What type of server/service type supports Node.JS applications?
Is we need to install node/npm on server.
Does it need to be a dedicated server?
Thank you in advance.
I don't think you need anything special, even a random Raspberry PI with linux can host NodeJS app.
Since node.js have executable on Linux, Windows and Mac, the hardware will not be limited by what can run node.js, but by what your script need, and the workload you expect.
If you run a basic website with little trafic, a RPi will be enought, if you were to port Facebook or Google to node.js, you would still need complete dataserver.
So the only limit is third party utilities and your own knowledge of the platform you use.
Node.js Application can be hosted on Linux,Windows or any other O.S. And for node.js Application there is basic minimum setup is required. like Node.js , git bash, npm etc.
you can follow this link
Related
I've created a REST API using Node.js and Express, so now I need to share it and publish it on a server in order to connect from Front-end.
Can you tell me a proper way to do it?
You could use Heroku for deployment, this way you can know how your app will fare. It's free moreover.
If you're satisfied with it then you can go ahead and buy a dyno or use other platforms like Azure or AWS.
To learn more on how to deploy your existing app to Heroku, visit this page.
The question you are asking is very broad. It can be done in a lot of ways. For me this 2 part tutorial was very helpful:
https://hackernoon.com/tutorial-creating-and-managing-a-node-js-server-on-aws-part-1-d67367ac5171. However, this only covers the installation on AWS EC2. This doesn't differ much from deploying it to Google Cloud, Azure or something local.
In general you need to fix the following steps:
1) Create a server somewhere (local or in the cloud)
2) Install all the stuff to run your app. In your case Node.js at least
3) Put a copy of your app on the server
4) Run it with node
5) Go to the ip of the server
The tutorial gives more details. DISCLAIMER: If you actually want to use this in production there is way more to consider. For example, security policies, setting up proxies, installing certificates etc. Please read up on that properly before you start running production apps.
You can install node on the the production server and then where the project is situated just .
copy that path
Open the Cmd >>
Enter "cd copied path .>>enter
you npm will be install & REST Api will Work.
My requirement is using Javascript I need to check whether xyz.msi/xyz.pkg application is installed or not in windows & mac system.
But I could not find any solution so I am trying through NodeJS. I have the following doubts
Will NodeJS help me to achieve above requirement?
Is there any way to get list of installed application using nodeJS
or by passing particular application name can I get information about that application using NodeJS.
If anyone has ideas, Please kindly share it.
tips:
I'm not sure javascript but node.js.
when you exec your project in node.js, you've has operate permission to do anything on your platform of os.
you can use child_process of node.js to exec shell on your pro and watch stdout to check if you have installed.
I have implemented a nodejs server that serves incoming requests to use the bluetooth services of the local computer. I want the nodejs server to be packed as an windows executable file so that I can distribute it. People should be able to just install/run that .exe which will install any packages required (if any) and run the server. How to do this?. I saw and tried node-webkit etc., but they are UI-centric, that is it can pack a nodejs application that opens a html page. But I want my server javascript file to be executed, like the way it is done in command prompt : node file-name.js. How to do this?
I've a server running with nodejs and for execute this I use a .bat file.
Create a .bat file
Inside of the file put:
cd path/to/server/
node índex.js
I used JXCore for this task in the past. It basically creates one executable that includes everything.
Unfortunately active development of is halted.
Solution:
You can use nexe for that.
Create a single executable out of your node.js app
Motivation
Ability to run multiple applications with different node.js runtimes.
Distributable binaries without needing node / npm.
Starts faster.
Lockdown specific application versions, and easily rollback.
Faster deployments.
OK, here's what:
I don't want to write an OSX app in node.js - the app is almost complete and 100% in Objective-C/Cocoa
I don't want to bridge Objective-C and node.js
I want to be able to execute a js/node.js script, regardless of whether the user has already pre-installed the node.js binary
So, is there any known way? What would you suggest?
I found a couple resources that look as though they have had success embedding node in a Mac App. I haven't tried them yet, but they look promising.
How to add NodeJS and node_modules to a Mac App
https://ind.ie/labs/blog/gracefully-running-node-as-an-nstask-in-cocoa/
Have a look at zeit/pkg: Package your Node.js project into an executable.
Once you have in place a failry complex socket.io + node.js setup, how could you make some tests without using the browser? Do you know if is it possible to create node.js clients that use socket.io to communicate with the "master" node.js server? (the one to which are talking to the browsers). Of course, the logic in the browser would be copied in those clients, but still...
There is now the official socket.io-client by LearnBoost
npm -g install socket.io-client
I also made some tests using the phantomjs headless browser