Why Laravel is working without WAMP server? - laravel-5.4

I was doing some stuff on Laravel, and noticed that my projects done by Laravel can be executed, without running WAMP server. How does it working? I used to think, that to run PHP code, or to retrieve/write some Data into your DataBase you need to run your WAMP server. But now I don't run WAMP server and it still works fine.
Do you have any idea about this issue?

That is because Laravel runs on a built-in server. From the docs:
Typically, you may use a web server such as Apache or Nginx to serve your Laravel applications. If you are on PHP 5.4+ and would like to use PHP's built-in development server, you may use the serve Artisan command:
php artisan serve
By default the HTTP-server will listen to port 8000. However if that port is already in use or you wish to serve multiple applications this way, you might want to specify what port to use. Just add the --port argument:
php artisan serve --port=8080
About Artisan CLI.
Some technical details about the built-in server.
I hope it helps!

laravel has a build in server using
php artisan serve
for stoping it you should stop the cammand prompt ctrl+c

Related

Deploy my Flask app to Heroku using my own MySQL server

I have a project with a Flask backend and Vue frontend. I want to deploy it to Heroku but using my own MySQL database from my own MySQL server, without using Heroku's dynos.
Is this possible?
That depends what you mean by
my own MySQL database from my own MySQL server, without using Heroku's dynos
If your MySQL server is accessible from the Internet, sure. Just point your application at it.
(Note that using one of Heroku's database addons does not mean using dynos. These services run as hosted services on the cloud, not on your dynos. JawsDB and ClearDB are both options and both have free tiers.)
If you're talking about something running inside a firewall, e.g. on your laptop, then this won't be possible without doing a bunch of network stuff. It's possible but I strongly urge you not to do this. It's easy to create security issues.

Can I deploy mysql in the openshift and access from the outter

I create a diy Appliation and add a mysql cartridge and bind it to the port 8080.Is it possible to access outside the network through domain? I have a little idea about the routing
system.
I am not very sure what you want here. But you can use putty in your local machine to connect to Openshift mysql.
Thank you
You can use port forwarding using the 'rhc' command line or using the OpenShift Tooling in JBoss Tools. In both case, you'll have a set of local sockets to connect to, and it will forward commands to the remote 3306 port on your OpenShift gear, so you can run MySQL/SQL commands on your database.

Run mySQL on Server with Django

I'm new to web development and I'm trying to go live with my website. Currently I can run MAMP mysql and then in the django app I can run 'python manage.py runserver' to run a virtual version on my system.
Currently I have uploaded (rsync) my django files to the server. How do I upload and run my mysql server on the web server? How do i dictate the domain? I know before that the domain was 127.0.0.1......
THanks
127.0.0.1 is localhost, so if your code is hosted on a remote server you can still access the db with that host. You need to first make sure MySQL is installed on the server. Once that has been taken care of use the MySQL terminal to create your db, its as easy as that.
Here is a useful page of MySQL commands:
http://www.pantz.org/software/mysql/mysqlcommands.html

wordpress and node.js

Is it possible to install wordpress and node.js server on same server maschine and use wordpress mysql database also from node.js? Also is it possible to have noSql also installed on thah server to use with node.js? I want to use wordpress for frontend for my portal, but all asynchronous work to do with node.js and reading some data from wordpress mysql and writing some to noSql. Can someone please help me with steps how to achive this for testing purposes.
Thank you for your time and best regards!
If you're planning on using node for being accessed asynchronously by JavaScript that's being served by wordpress, then it will make your life considerably easier to have them running on the same host and port. What I've done in the past is set up the following:
Apache + PHP + Wordpress running on some port (8000?)
Node + npm + ever other package you'll want running on some other port (9000?)
HAProxy with some rules listening on port 80 which will decide based on the path which of the two servers to send requests to.
A normal installation of MySQL and whichever NoSQL DB you pick.
Recent versions of HAProxy can also terminate SSL, if you want to do the same with HTTPS on port 443.
Here's a sample HAProxy configuration:
defaults
log global
maxconn 4096
mode http
option http-server-close
timeout connect 5s
timeout client 30s
timeout server 30s
frontend public
# HTTP
bind :80
use_backend node if { path_beg /services }
# Everything else to Apache.
default_backend apache
backend node
server node1 127.0.0.1:9000
backend apache
server apache1 127.0.0.1:8000
Right, it's possible. The only catch is that Apache (running Wordpress) and Node.JS can't bind to the same port. In other words, you'll need to have Wordpress running on port 8080 and Node running on 80 (or other different ports).
Install Apache, PHP, Node, NPM, MySQL, NoSQL...
Configure Apache to listen on the desired port. (8080?)
Install Wordpress & Start Apache.
Start your Node application.
As for the precise steps involved to install those services, there are hundreds of guides online.
Yes it's possible, try express-php-fpm package.
You can use WordPress as backend only and Node.js for frontend.

django mod_wsgi, nginx MySQL or Postgres

I am looking to find out from the community which you think is best?
Django running with the following.
Django, mod_wsgi and MySQL
Django, mod_wsgi and Postgres
Django, nginx and MySQL
OR
Django, nginx and Postgres
?
I use nginx because it's faster and I like how the configuration is set up. I have never run into any trouble using it so I can't see why one should rather use Apache + mod_wsgi.
Also, using fastcgi, you can restart your django site without restarting the whole nginx server, which I like.
And Postgres because:
If you're not tied to any legacy system and have the freedom to choose a database back-end, we recommend PostgreSQL, which achives a fine balance between cost, features, speed and stability. (The Definitive Guide to Django, p. 15)
Copied from: MySQL vs PostgreSQL? Which should I choose for my Django project?
EDIT:
I now think that uwsgi running behind a load balancer (varnish) is the best solution. nginx can then be used to serve static content.
See "Varnish and nginx, the best way (0.9.8.4)" # http://projects.unbit.it/uwsgi/wiki/Example
You can use Emperor ( http://projects.unbit.it/uwsgi/wiki/Emperor) for managing apps in uwsgi. This will allow you to restart individual apps by simply touching their config files.
According to this benchmark Django+ uWSGI wins.
You can use nginx as a proxy and have apache run on localhost.
To start a single django project, you'd touch the wsgi file for that project and it will only reload that instance of django. You don't need to restart/reload apache