I've installed node.js, grunt.js plugin and a less plugin on my own computer, and now I'm about to connect it to a remote server and use it there. I have a couple of newbie (perhaps some of them are dumb) questions regarding this:
Do I have to install node.js, grunt.js etc. in a remote server folder also? Or is it enough that it's installed on my own computer?
I use windows 8.1 (if that is relevant) and I wish to connect to a FTP-server, or a SSH-server (I've been provided with the server name, the FTP-Port number and the SSH-port). Which type of port should I use?
The actual script file that is going to be executed by the npm, should they be placed in a folder on that remote server as well?
You local development environment is indeed completely separate from your remote server environment.
Yes, in order to run node scripts or grunt tasks, it is required that your remote server environment also has node and grunt installed.
FTP is commonly port 21 while SFTP is commonly port 22. However, you should probably be using an IDE or FTP client that supports your development transactions. IE: uploading new code to a remote server. You should also consider version control and/or continuous integration / code deployment routines.
Yes, you should essentially mimic your local environment on your remote server environment. While they may not always be 1 for 1, especially depending on what operating system your remote server is, ultimately they are completely separate. You might be interested in vmware, virtualbox, vagrant, or docker.
Related
I have a nodejs application that i wanted to deploy on a local server(which is running Fedora 36). I have developed the NodeJS side on another pc,and it works fine when the node is running. But when i copy the node server directory to the fedora serve and run it,it only works on local host. I couldnot access the server even if i'm in the same network.
I'm developing the app for a small locally connected PC and i donot want to use the hosting companies as well as Heroku. Is the it the firewall that is blocking my request to the server? What option do i have to host it locally? Is there a better way?
Your node.js server is running on a port determined at the end of the script usually. Sometimes 3000. but can be anything. The correct way for others to access is as you say...
http://your.network.ip.address:port/
or
example ip
http://192.168.0.3:3000
check your local ip and port where you run this server.
How could others, on a local network, access my NodeJS app while it's running on my machine?
I use the example for the chat server in ReactPHP. My server listens on port 8080
$socket = new React\Socket\Server(8080, $loop);
$server->listen($socket);
in my local PC. The written code is working correctly but when upload files into my Linux host, nothing works. I wrote a ticket to the support team from my hoster, they said that this is not possible in Linux. Is that correct?
ReactPHP core team member here. Your run-of-the-mill shared hosting won't be able to host this. You need your own server, VPS, or bare metal, to run ReactPHP as a server because you're dealing with a daemon process. And shared hosting generally doesn't support that.
My suggestion is to get a VPS somewhere and look into Supervisor to keep your process running and restart it when something happens to it. This also requires you to manage your own server with all the firewalling and networking knowledge that comes with it.
What are system requirements for the Linux server where are remote agent of Bamboo?
I found the requirements only for the server where Bamboo server is: https://confluence.atlassian.com/bamboo/bamboo-best-practice-system-requirements-388401170.html
At a minimum the Remote agent needs JDK8 (or perhaps only JRE8), some memory - around 512MB at a guess, and the ability to be able to communicate to the Bamboo Server.
But if you want it to be able to do some useful work then you'll need to make other capabilities available to it, e.g. Ant, Maven, git, perhaps more memory... whatever is required for the work it is supposed to be doing.
I have just started studying Puppet. I understand that puppet can work in solo mode and in the master/agents configuration.
Ideal Use Case
I have a server on Digital Ocean, I would like to use the Puppet GUI to manage the remote server from my MAC, (if possible without running a VM). Is this possible or I am obliged to rent another server that run as a master (if I want to use the Puppet GUI)?
Is there any linux scripts to for uploading nodejs app to myown linux server?
Like appfog or heroku. I have dedicated linux server and working on linux too.
I want upload my nodejs application to server and restart nodejs with one shell command.
I can write script, but maybe don't need to invent bycicle?
Popular choices using SSH:
rsync
fabric
For serious stuff you really should look at configuration management and server provisioning applications like (in no particular order):
Chef
Puppet
Ansible (+1 for the name, "Enders Game" is one of my favorite books)
Most revision control systems allows for "after/before-commit" hooks; sometimes I use these hooks to run tests before and automatically deploy to the acceptance environment after commits.
See also Jenkins CI (Continuous Integration is a hot topic).
I use fleet from substack to manage deployment. Fleet is a git-based tool that allows you to deploy code and manage your node processes running on remote servers.
Adding in seaport and either bouncy or node-http-proxy is a great way to build an application that is made up of lots of small components that work together.