This might be a very nooby question and I myself do not believe there is any way, but I just want to give it a try.
So: I rented just a web hosting, where I built websites using php. But since it is just a web hosting plan, I have no access to a terminal. I want to publish a website which I previously developed and ran on my own computer. I do not want to rent a whole server, because it needs to be secured and this is out of my current knowledge, so is there any way?
Thanks in advance!
If you want hosting that supports Node.js then you need a hosting plan that either:
Grants full access to the server (so you can install and manage Node.js yourself) or
Explicitly supports Node.js
Related
I'm new to Node.js and I've been going through some tutorials. I've been able to make a simple web page in Node.js and run it as its own server from the command line on my desk top. However, I would like to create it to use it as a website that others can access, as well. Therefore I was wondering how can I host a web site built with Node.js on a remote server?
Option 1:
If you have public IP then you can host the website on your server
Option 2:
Find a service provider who can host your Node.js application. e.g heroku
I would recommend you check out Heroku. They offer a very simple hosting service at a variety of pricing tiers (including free) with a wide variety of add-ons. Deployment is as simple as pushing to a remote GitHub repository.
I do not have the privileged nor the permission to ask for a server in my workplace thus I was thinking of developing a local web application on my computer and utilizing a common space folder to let everyone access my web based tool.
How can I use a client to entirely develop a web application, query database, and do all the things that you'd generally do using a server?
I don't think you can accomplish what you're talking about through a browser app alone. Modern browsers have local database storage, but without a server you simply can't have central data that everyone can access.
Why not set up a local server on your own machine? Node.js servers are very easy to set up and perfect for simple use cases. Your coworkers could access the app via your IP address anytime it is running and your computer is on the network.
For more specific information please ask a more targeted question; this question is too open-ended to have a clear answer.
I know this question may seem stupid but I've been googling and asking this question for a while since I decided to start learning node.js. Ok so I have a hosted web server over at X10Hosting (https://www.x10hosting.com/) and I'm wondering how I could host a simple node.js web app on it. Thanks, any help is GLADLY appreciated (an actual tutorial or documentation would be really help).
You can't deploy a NodeJS/Django in this type of server.
When you sign up for a free hosting plan in x10hosting, they give you a folder in their server.
When a request come for you, Apache/nginx (which their are webserver) will execute the corresponding PHP file in your folder and will give to the client the output.
NodeJS is a very different type of installation.
It have is own process which it will bind a port, handle and process the request, and give the client the output. So, you will need to install it on their server, but i don't think x10hosting will do that just for you. And Django work the same way.
Nodejitsu ( https://www.nodejitsu.com/pricing/ ), the "owner" of NodeJS can host your app for free if the application is open-source.
I hope this will help you ;)
x10hosting's free hosting service is a shared hosting service, that means that you're allowed a folder inside a system shared by many users. That system has PHP5 and MySQL (as I read in their website), but Django and Node.js are a very different software stack. See, software stacks like Django or Node must be installed by the system administrator in order to serve content like a website. The administrator provided PHP5 and MySQL, but no Node or Python support. With a VPS, or Virtual Private Server, you are your own sysadmin, and free to install and configure whatever you want in your system, but it's not the case for shared hosting.
The Django Project website has a list, with some shared hosting or private hosting providers that support Django and some of them are free. For NodeJS you should checkout the Node Wiki's hosting list.
If you want to deploy easily you can use Heroku, it's free if you use only one Dyno (You don't need more if you create a website with low traffic)
Heroku and the really good documentation (with article for django and nodejs) : Documentation
I know that for connecting to the database from JavaScript I need to mention the database credentials in plain JavaScript code. Therefore for a online application that would be a huge security risk. But in my case I want to write a small JavaScript application which is stored locally. So the credentials won't be shown to the world but just to the user I give the application, which is acceptable for me.
The motivation behind this is that I want to connect to an online database without a running PHP server, just from a JavaScript embedded in the local page. My goal is to provide an application that can be run by the user without the need for PHP and a server, except the database server. It's similar to a desktop application but running in the browser.
How can I connect from JavaScript to an online MySQL database? All other similar questions I found on Stack Overflow advices the thread starter against this usage for good reason but hadn't answered the question.
I heard that connecting to MySQL from JavaScript would be impossible. But how do, say, Windows 8 Metro Apps written in JavaScript handle that issue?
A backend repeater is always needed. For this issue you can set up a light-weight server that forwards your database accessing request to mysql server using, say node.js.
If you are focussing on a specific web browser, maybe you'll find a workaround. But if you're thinking on a local application independent from the user agent, you should follow the standards to reach a predictable behavior (or at least the best approach). In the W3C standards you have two options for storage:
Web Storage API: you're limited to key-value storage, but is very well supported.
Indexed Database API. I've no experience with it, but it's supported.
If you're not to limit the user context to a restricted machine and user agent, you can start with standard storage solutions as mentioned above and then enhance your app for more advanced browsers (perhaps even with MySQL!), as recommended in Progressive Enhancement
I have this idea of developing an application (or a companion application to another web based application) on a client. My initial idea was to run it on a XAMP stack on the client. Although this is perfectly feasible, I was thinking of a more compact approach using javascipt+html5 (with web storage / indexed db). I think that not running a web and database server would allow my application to become less resource-intensive. Any ideas please.
What are you trying to accomplish with your app? Keep in mind if someone clears the cache, they can delete all the data that was in the local storage.
As to "resource intensive", is this personal resources (like paying for a server)? I rarely would advise anyone in making an app that is client side only with no server side backup, unless it's something you only need to use on one computer.
I think you are forgetting one thing, you still need a web server to serve the HTML and javascript to the client.
However could create a Adobe AIR app using javascript and sqlite.
http://www.adobe.com/devnet/air/articles/getting_started_air_js.html