deploying a node.js application on windows - node.js

I have developed a node.js application. I have two files serverpart.js and index.html (the html file is already referenced in server.js). During my development I run the application using command node serverpart.js and then access the client using http://localhost/8070. That was nice but now my application is ready and I want it to be accessed from other machines on the LAN. So please advice where should put these files(in some particular director). Do I need any web server for that please suggest.

Related

Merging angular2/4 files to Node.js server

Request you all to please help me on below question:
Premise:
I have created a working application- client-side using angular2 and server-side using node.js (Rest services are used). Both client and server using the different default port 4200 and 3000 respectively. Since this application is not that big and my company doesn't want to open any extra port for security reason hence I was suggested to move all angular files to node.js server which then thereafter host the entire application.
Question:
How can I move all my file from angular2 and add them to node.js so that it works as it was working before? There are many dependencies exist in angular2, similarly, it bootstrap components in a different way then how can I use angular files in node.js?
Any suggestion or solution are deeply appreciated.
You can you ng build. This command will generate a dist folder and your node server can read it. If you use expressjs you can see the example MEAN Stack (Angular 5) CRUD Web Application Example .

How can I download a Meteor application sent by MUP?

I have lost the Meteor application files that have been sent via MUP, which are on different Linux servers in Digital Ocean. Is there an easy way to download the developed applications so I can make the changes?
You can get Build application from docker
but javascript and all files are bundled & compresses you cannot modify them easily.
To retrieve deployed app. open server and use docker to get deployed app
its located inside /opt/:yourappname:/ in docker.

Running angular2 on hostgator (or any host)

I have started getting into angular2 recently and have previously used angularjs. This might seem like a very broad question but all of the tutorials show how to use angular2 on a local environment and show how to serve the app and navigate to localhost:3000 etc. So my question is how do I go about running my app on my hosted server. Like how do I get it to go to my app using www.mysite.com? Do I copy the files to my public_html directory or do I have do do something to make my domain go to the port the app is being served on? Or do I have to turn off apache and do something to use node instead? Any help would be apreciated.
is very simple:
Copy local files into remote folder
Execute ng build --prod
your domain root route should be myremoteFolder/dist
hope this help you
Angular is a frontend framework, which means it runs entirely in the browser. This means it's files are "static", they don't require a web server to dynamically process the way PHP files would. This means they can be hosted anywhere static files can be hosted such as AWS S3 or whatever directory you'd put your images and stylesheets on HostGator.
I'm assuming the localhost:3000 is a simple development server used for local testing. If it does more work than that, such as expose API endpoints that your Angular app calls to, then you'll need to find a host that can run NodeJS applications.

how to install node modules for node app on public web server?

I am creating a webapp which will be used by the users around the globe. In order to use the app, they have to go to the give url and use the hardware called Neurosky Mindwave. This hardware will capture their EEG signals and send it to the webapp so that users can see their brain activity in the webapp.
I have successfully created the app using this node module and I was able to run the app locally but now I need to move this app to my hosting hosting gator server and I don't know how to do that.
On my local machine this node-module is able to capture the data from the TGC [think gear connector] which actually ports the incoming data from EEG headset [Neurosky Mindwave] to the app using local ws//127.0.0.1. Now I am not able to understand how to move this app to my hosting website. Can I do that? or hosting gator doesn't support or allow node modules to be installed?
What I believe is that the most important part is node-neurosky-module which my app requires in order to connect with the external hardware. I think I probably don't need nodejs server in order to use this module instead I can use something else but I might be wrong as I am less experience with this kind of technology.
In simple terms -
EEG Headset [Neurosky Mindwave]---signals---> TGC [thinkgear connector] ---> Node-Neurosky-Module [running on nodejs server ws//127.0.0.1] ----> Web app
This is my app directory structure
NeuroskyWebApp --
css
bootstrap.min.css
js
bootstrap.min.js
custom.js
jquery.1.2.1.min.js
node
app.js
node-modules
node-neurosky --> some more files ...
options --> some more files ...
ultron --> some more files ...
ws --> some more files ...
index.html
node.js and the package that you mentioned node-neurosky-module run on the server, not the browser. So there is no way for your users to run the application by just visiting a url, they need to run the same node server application that you have now on their machines to capture EEG device input.
Fortunately, there are frameworks that you can use to package your whole application (node server and html pages) in a standalone desktop app that works on all operating systems. You can google "javascript desktop". The most popular of these frameworks is electron which I recommend for your case. You can easily find tutorials on youtube to get started with it.

How to upload Node.js Application to FTP server?

I am kind of new to Node.js but I built an application and am pretty happy with it. I was wondering how would I go about uploading my Node.js application to an FTP server? Is it even possible to do this?
A Node.JS application is just a collection of files. You can upload them to another computer using FTP just like any other files.
That probably isn't what you are trying to ask though.
If you want to host a website built as a Node.JS application then you need to be using hosting that either:
Explicitly supports Node.JS (Google finds this list) or
Gives you full admin access (such as a virtual or dedicated server)
Such hosting will generally give you (at a minimum) shell access (via SSH) which you can use to run the Node.JS application.

Resources