Can API Platform be deployed in a LAMP env' on shared hosting, like Hostgator? - deployment

I currently have a reseller account through Hostgator and am wondering if API Platform can be deployed there. The documentation states "The server part of API Platform is basically a standard Symfony application, that you can also easily deploy on your own servers." but it's not clear to me whether or not the server part (e.g., /api) can be broken out of Docker and installed in a standard LAMP lamp env. It seems feasible but I'm not certain it would work like that.
Any guidance will be appreciated. Thanks in advance!

Yes it can! The Docker integration is 100% optional.
Because the content of this directory is actually just the Symfony Skeleton + the configuration for the API Platform bundle, you can just upload the content of the api/ directory on any LAMP server. Set the appropriate environment variables (for instance the RDBMS), and you’re done.

Related

How to deploy nuxt.js with mongodb on cpanel

I'm wondering any possible to deploy nuxt.js with MongoDB on cpanel hosting, i have a shared hosting bought from Hostgator. Really need help from this, thx.
my nuxt.config.js
For Nuxt, it depends on your build target and app mode. Are you using SPA or universal?
If you are using SPA, this can be packaged using nuxt build. This output can then be hosted the cpanel as a normal static site using something like Apache.
If you are using universal mode, you will have to ensure you are generating a static site using target:'static'. Once you've configured that in your nuxt.config.js, you'll be able to run nuxt generate and upload the built files to your cpanel.
Please take a look at the Nuxt page for static generation.
That said, I'd wholly recommend you don't use cpane or hostgator. Such hosting doesn't scale and relies on technology like Apache that is resource heavy and slow.
I'd suggest you deploy your Nuxt site to Vercel by following this tutorial here
Vercel is free for non-commercial use and scales infinitely based on your usage. It's incredibly fast and optimised for these types of sites. Deployment is a breeze.
You won't be able to deploy the MongoDB instance on the cpanel unless you have VPS access, or the cpanel has a pre-configured option.
I recommend you use MongoDB Atlas to easily provision, configure and manage your MongoDB instance.
When combined with Vercel, this should give you an incredibly easy and also performant deployment of your application.

How to access to a local domain -which is used in a mobile app- from iPhone on testing phase?

I have been working on a NativeScript project that uses an API. The API project is on my MacBook and haven't deployed to anywhere yet. It's based on Laravel and I use Laravel Valet as development environment.
I can't test the mobile app on iPhone because the app can't connect to local API URL. I know Valet has "share" command, but because the API consumes another API -which has IP restrictions-, it doesn't work for me. Sharing a local domain via Valet's share command is something like a proxy as I understand, so the consumed API doesn't work on that proxy.
I also checked articles about how to share Macbook's network with iPhone, but it only shares the same network. I can't access the local API still.
Is there any other way that can resolve my issue? Maybe a Docker based solution? I am not that good at Docker, but I can give a try if it is possible with it.
https://ngrok.com/ will happily expose your local Laravel Valet server.
Looks like there's a bit of a walk through on that here too https://mannyisles.com/using-laravel-valet-and-ngrok/ which may help?

how can I test my published restful web service in azure

I created a restful web service with java in eclipse
I used Eclipse toolkit to deploy my WS.
I'm just wondering how to test http requests? I mean there is the default URL to the app porvided by azure myapp.azurewebsites.com
but how to do a POST or GET?
and also DO I need to chose the same tomcat version when deploying my app in azure?
I have tomcat 6 on my computer, but in azure i chose tomcat 8 for example
thank you all for your answers.
I don understand your question. You can perform a GET request in any browser and a Post using tools like Postman or Fiddler (just to name a few). We can' tell you which path you have to use because it depends on your application but it should be the same as if you run it local (except the different host address). Also whether you have to choose the same tomecat version depends on your application and the component it uses - you are the only person who can answer that.

yii2 remove backend/web and frontend/web from url

I am trying to change site url from http://localhost/yiiwebsite/backend/web/index.php url to http://localhost/yiiwebsite/admin and http://localhost/yiiwebsite/frontend/web/index.php url to http://localhost/yiiwebsite/.
Can anyone help me to do this.
It's described in official docs here.
Here is some basic info:
The application installed according to the above instructions should
work out of box with either an Apache HTTP server or an Nginx HTTP
server, on Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii
2.0 is also compatible with facebook's HHVM. However, there are some edge cases where HHVM behaves different than native PHP, so you have
to take some extra care when using HHVM.
On a production server, you may want to configure your Web server so
that the application can be accessed via the URL
http://www.example.com/index.php instead of
http://www.example.com/basic/web/index.php. Such configuration
requires pointing the document root of your Web server to the
basic/web folder. You may also want to hide index.php from the URL, as
described in the Routing and URL Creation section. In this subsection,
you'll learn how to configure your Apache or Nginx server to achieve
these goals.
By setting basic/web as the document root, you also prevent end users
from accessing your private application code and sensitive data files
that are stored in the sibling directories of basic/web. Denying
access to those other folders is a security improvement.
If your application will run in a shared hosting environment where you
do not have permission to modify its Web server configuration, you may
still adjust the structure of your application for better security.
Further configuration depends on chosen web server (Nginx / Apache), which is not even mentioned in the questoin. But both options are covered in official docs by the given link.
For shared hosting environment there is special section too.
And by the way this was asked before many times here on SO, just do a better research.

Heroku-like services for Scala?

I love Heroku but I would prefer to develop in Scala rather than Ruby on Rails.
Does anyone know of any services like Heroku that work with Scala?
UPDATE: Heroku now officially supports Scala - see answers below for links
As of October 3rd 2011, Heroku officially supports Scala, Akka and sbt.
http://blog.heroku.com/archives/2011/10/3/scala/
Update
Heroku has just announced support for Java.
Update 2
Heroku has just announced support for Scala
Also
Check out Amazon Elastic Beanstalk.
To deploy Java applications using
Elastic Beanstalk, you simply:
Create your application as you
normally would using any editor or IDE
(e.g. Eclipse).
Package your
deployable code into a standard Java
Web Application Archive (WAR file).
Upload your WAR file to Elastic
Beanstalk using the AWS Management
Console, the AWS Toolkit for Eclipse,
the web service APIs, or the Command
Line Tools.
Deploy your application.
Behind the scenes, Elastic Beanstalk
handles the provisioning of a load
balancer and the deployment of your
WAR file to one or more EC2 instances
running the Apache Tomcat application
server.
Within a few minutes you will
be able to access your application at
a customized URL (e.g.
http://myapp.elasticbeanstalk.com/).
Once an application is running,
Elastic Beanstalk provides several
management features such as:
Easily deploy new application versions
to running environments (or rollback
to a previous version).
Access
built-in CloudWatch monitoring metrics
such as average CPU utilization,
request count, and average latency.
Receive e-mail notifications through
Amazon Simple Notification Service
when application health changes or
application servers are added or
removed.
Access Tomcat server log
files without needing to login to the
application servers.
Quickly restart
the application servers on all EC2
instances with a single command.
Another strong contender is Cloud Foundry. One of the nice features of Cloud Foundry is the ability to have a local version of "the cloud" running on your laptop so you can deploy and test offline.
I started working on the exact same thing as what you said a few weeks ago. I use Lift, which is a great framework and has a lot of potential, on top of Linux chroot environment.
I'm done with a demo version, but Linux chroot is not that stable (nor secure), so I'm now switching to FreeBSD jail on Amazon EC2, and hopefully it'll be done soon.
http://lifthub.net/
There are also other Java hosting environment including VMForce mentioned above.
If you are looking for a custom setup which also has the ease of deployment that heroku offers: http://dotcloud.com. They are invite only right now but I was given access in under three days. I am working on a Lift/MongoDB project there and it works well.
Off the top of my head, only VMForce comes to mind, but its not available yet. This will be a Java-oriented service, so that probably means you'll have to spend a wee bit of time figuring out how to package the app.
For more discussion, there was a debate about this in 2008.
I'm not entirely sure if it's really suitable or not, but people have deployed Scala applications to Google App Engine, for example http://mawson.wordpress.com/2009/04/10/first-steps-with-scala-on-google-app-engine/
Actually you can run scala on heroku right now. You don't believe it?
https://github.com/lstoll/heroku-playframework-scala
I'm not sure the tricks lstoll has used are legit but using the
new cedar platform where you can run custom processes and some
ingenious Gemfile hacking he has managed to bootstrap the Java
play platform into a process. Seems to work as he has a live
site running a test page.
Stax cloud service offers preconfigured lift project skeleton. Also, there is a tutorial on how to deploy lift project to appengine.