I'm not sure if this is a programming question, or would be better served on a sister site.
I want to mock up a web site & distribute it by email to some non-tech people for comment.
I can't ask then to install an Apache server, but wondered if I could bundle the site into an .exe, or a .zip and have them open Index.php and play around with the site.
All users are non-techie; all will use Windows; the site is coded in PHP and all internal references to URLs, CSS< images are by way of $_SERVER['DOCUMENT_ROOT']
Any advice?
Just throw it on a web server hiding behind some authentication.
It'd be hard to ask a non-techie person to get it running seeing that it would need apache or another server that would run the php. If I were you I'd probably set up a site that's password protected, you send the link & password to the people and they have a look.
I recommend using something like XAMPP if you can get them to install it. Unfortunately, your website cannot run locally as is without the proper software.
Alternatively, you can either pay for web-hosting or create a server that you can access via its IP address from another user's machine. Make use of this guide for access control if you wish.
Related
Finally i completed my first full project using server, client, data
i would like to know few things about how to host and upload full website include(server ,react, mysql)
i so wondering how that is work, for now i understand that to upload a simple website you need a domain and to hosting, just do npm run build and upload it..., this is something that i know but, when that is not just a simple website like
when i have such as
server side with Node.js + express that have requests (on localhost) *probably need to change the localhost to something else but what
Database running with MySql
React app that have many request to (localhost)
how can i hosting all of them and running my website for everyone, i mean that my sql will still running, CRUD Data will update normal, and the server will still get request and send or update them to mysql data.
and if I'll want to make some change on mysql, server, client
i want to change it like i change it now
Actually i'm not a FullStack developer if i don’t know it... 🥶 so i really interesting to understand all of that issues
i hope you guys havק An understandable answer for me, thanks 🙏 and just take your time :)
Well, where to start hehe. There are a lot of different ways to host a web app. Heroku for example makes this process really simple.
Personally, I use Digital Ocean to host my apps. This is generally how that goes:
I have a project with a folder structure that seperates the server logic and the client logic.
Since you're using Node, you build your client with npm run build. Next make sure the dist/build folder is inside your server folder. That is the folder you are going to 'host'. On Digital Ocean, you make a new droplet (which basically is just a tiny part of a server).
You install Node, Git, Pm2 and (for example) Nginx. You clone your project from Github to the server and install all the dependencies.
You have to do a few configurations with nginx (specifying a domain name for example) to make everything work. This article goes into more detail about that.
Also, a database is frequently hosted seperately. You should read more about that.
If you have everything setup, you can just code on your project as usual. Push new updates to github, and pull in the changes on the server.
Here is another post on Stackoverflow talking about hosting MySql with react.
I am writing code that will be deployed to a server. Right now I have to upload the code each time I change it. Is there any way to edit the code live on the server in Visual Studio code?
As there are some extension in the editor who provide that function this can be done in VS Code very simple. Just search in extensions for Keyword 'FTP' ...
Two Examples:
https://marketplace.visualstudio.com/items?itemName=humy2833.ftp-simple
https://marketplace.visualstudio.com/items?itemName=lukasz-wronski.ftp-sync
Both are very popular.
At the moment I personally use FTP-Simple. But have a look on your own. It depends on the things you wonna do. And don't worry ... it's a little bit tricky at the beginning to figure out how to setup and how they work ... but when you are in it works fine.
It depends what hosting you are deploying to. You can SSH into your server with most providers and use a command line editor such as nano or vim. Keep in mind, this won't keep the version on your computer up to date and the changes will be overwritten if you redeploy. Alternatively, If you have a VPS and want to edit the files in an IDE on your local computer, maybe a file transfer system like FTP or SMB would work. I don't suggest it though, there are huge security issues with them.
For Azure web apps, I've found that the Azure plugin for VScode is a quick and easy way to deploy my app. It's not quite real time but it's very easy to redeploy after updating. https://code.visualstudio.com/docs/azure/extensions
This is what I use to connect remotely to a couple Raspberry Pis, and a home server.
https://code.visualstudio.com/docs/remote/ssh
I'm not 100% sure if I'm on the correct section but i'll transfer the post once I know where it's supposed to be but I am looking for advice regarding web development, setting up a domain and hosting it.
I'm currently working on a personal project using Cloud9. Which is an online development environment where I can develop and host. The reason why I chose this is because it has MySQL usability as I retrieve and store data on the project I am working on.
I am now at the point where I want to get a domain and host a site to transfer my project over to a live website with my own domain which also has SQL/MySQL usability.
Any advice or where would be the best place to look up on methods of pursuing this?
Edit: I develop using PHP and JavaScript with MySQL
To start I would suggest heroku, they have a free option and some nice guides, depending on which server side language you use . This way you can get used to hosting some apps and doing deployments, seeing logs etc.
The database doesn't have to be on the same hosting necessarily, you can use mongolab for example.
For domain names it's a different thing, you will have to use the likes of godaddy
Why not setup your own VPS (Virtual Private Server)? There are many providers..
Design the software application with portability and avoid vendor lock-in to cloud services. For file transfer, there are FTP/FXP, zip/gzip, & version control standards like Git, CVS, SVN, etc. Use phpMyAdmin for the database export & import process to change web hosts. Otherwise, build a staging subdomain or a local development environment with copies of the original web app & use those to transfer files+DB to a new host for production.
quick question to day. I've done a little digging around on the net and i can't really find a very definitive answer.
Basically, I run my own server on a redundant dual core, 4gb ram 2Tb pc (server1)
And on here, i would like to make an FTP partition. Reason being, i would very much like to be able to transfer files back and forth work, uni and home as i please.
I also run a website from my server which allows me to stream media from my hard drive to any laptop, tablet, desktop, iphone, android.. you name it!
I would LIKE to be able to add a section on my website where by I can log in and access my files as a sort of HTMF5 Front end.
I am aware and know how to create a login with a database which has md5 hash and store cookies to stop un-authorised people accessing my ftp.
Any help or a shove in the right direction would be much appreciated! Thanks in advance :D
Yes it's possible. but that won't be HTML5 ftp server etc that you mentioned.
You can achieve this by installing a web server on your machine like apache and then make directories public - run Apache on some port and you will be able to access the directory. if your server is running on port 8080, URL will be like: domain.com:8080 - You can style directory using this simple script & make this password protected as well using .htaccess .
osFileManager
The other option is to use some php script. Many commercial scripts are available and as well as open source. i recommend you trying osFileManager - it has a lot of features like:
Browse the directory structure
Create files
Upload files
Rename files
Move files
Delete files
Edit files
Change permissions
Change password
Create users
Here is it's installation instructions: http://www.osfilemanager.com/osfilemanager-docs.html
or a paid HTML5 & AJAX based script can be bought for 14$ from here:
http://codecanyon.net/item/file-manager-and-backup-system/5177206
I'm coding an admin panel with a web interface that will only be run locally (not client-facing or hosted on an external server), and it would be helpful if it could launch an application from an <a href="">. Is this possible? I understand that this could be a browser security thing, but I also know that there are iTunes and App Store links (not quite sure how those work either), and I assume this is also possible for launching "x" application. How can I do this?
it is only possible if the application you want to start registers its own URI scheme with the OS. Though you could write your own app that starts other apps on demand. You'll have to register your own scheme then.
Found a solution! Instead of using an <a href="">, I've decided to run a shell command from a PHP script that just does open application_name.app and redirect back to the referrer.