I am building one application with Laravel as back-end and React.js as front-end. How to host the application in BigRock or GoDaddy? I searched for 2 days, and found nothing related. Please HELP!!
Laravel application hosting don't need something special... just take care of these things.
php version as per the desired laravel version.
composer should be installed on server.
Some pre-dependancies check here... https://laravel.com/docs/5.8/installation
Your domain should point to <application_root>/public folder.
If you are using mix make sure node should be installed.
After that..
Just clone / upload the code on server and run the desired commands like..
composer install & npm install to install the laravel dependancies & node dependancies.
As per your case you are going to host two application here. So you can follow the following approach.
Host laravel application as sub-domain like api.domain.com and react application on main domain.
I hope you are already fimilar with what's required for hosting react application.
Edited:
For the shared hosting, you can request to enabled the shell access from hosting provider support team. Once they enabled, you'll able to run the linux command and do install by yourself.
Sometimes they could install required software for you.
All the best!
Related
I am developing an Excel JS TypeScript React addin with VS code. I deployed my add-in to Azure and it worked fine. Now I wanted to start a localhost for development purposes but all of a sudden I got this message:
I am posting this question, so clearly there is no issue with my internet connection. Furthermore I tried to surf to the https://localhost:3000 URL and it gave me a blank page with this text:
Cannot GET /
I tried to use the Yeoman Generator to create an empty project because I thought I maybe messed up the webpack.config.js file or the manifest but installing the boilerplate React TypeScript Excel add-in did not get me anywhere neither because even the npm install command did not succeed. I have no idea how to tackle this.
many thanks in advance.
Thanks to Eugenes feedback I dug back into the Yeoman generator and generated a new boilerplate react project and found that a package.json.lock file was blocking npm install. After I removed the package.json.lock file I was able to perform the npm install command and then I compared the manifest file from the newly created boilerplate project to the actual project and I saw that I accidentally replaced the https://localhost:3000 by http://localhost:3000. So if you do not attach the s in HTTPS, it does this strange error. the reason I replaced it is because for production I use another URL.
Most likely something is preventing access to the URL. It can be local firewall software, VPN software, proxy configuration or Metered Connection setting.
Be aware, to run web add-ins you need to generate and install a valid certificate to use https. Office Add-ins should use HTTPS (not HTTP) even when you are developing, because Office clients require add-ins and webpages to come from a trusted and secure location. If your add-in fails to load within an Office client, it may be because you haven't installed (trusted) the certificate that the Yeoman generator for Office Add-ins provides. To make sure a valid certificate is used, try to navigate to the html file in any web browser.
Also you may try to switch to another network connection and try again.
I am new to React. I have created a simple React application. I wanted to explore deployment and hosting options for React. I have worked previously in Angular and it can be deployed in IIS. can we do the same for React. Please enlighten me.
According to your description, I suggest you could follow below steps to host or publish the application to IIS.
1.Open cmd and locate your react application folder
2.Build the project to production folder.
npm run build
3.Open IIS management console and create a new web sites and use the build path as the physical path. for example: D:\ReactAppTest\my-app\build
Notice: You should pay attention to your port number.
4.Then you could use that port number to access your react application. For example: http://localhost:9965/
In my ionic application rest service doesn't work when i create apk file using below code
adb install -r platforms/android/build/output/apk/android-debug.apk
If i run application in browser:
ionic serve
then its work file
If I run application in mobile using below code
ionic run -l
then its work fine..
But once i create apk file and install in mobile then service does't work..
how can solve this problem??
please help
The most probable reason is that you don't have cordova-whitelist plugin. The newer version of cordova/ ionic requires for you to use this plugin
Steps:
Install the plugin
cordova plugin add cordova-plugin-whitelist
Update your config.xml to whitelist the allowed urls:
<allow-navigation href="*" />
Refer https://github.com/apache/cordova-plugin-whitelist for details
The rest web service is hosted locally on a development server or PC and running on a address like e.g. http://localhost:8888. Once compiling to an APK it will also be expecting the service address which obviously is not on the device itself.
Therefore you need to host the REST service locally on a development server or PC using a WIFI enabled network exposing the PC's IIS or Apache (which ever one you are using) or you can use cloud hosting and reference the newly created API address in the app's source before compiling the APK.
This ARTICLE provides a good explanation between the difference of ionic serve and run variances
I am presently reading Manning's AngularJS in Action by Lukas Ruebbelke
The introductory part suggests,
Because you’re pulling files from a CDN, you’ll need to run
Angello Lite(the application name) from a web server. There are a few ways to do this, but one of the easiest ways is to use the npm package serve.
The steps for installing Angello Lite are as follows:
■ Install Node.js. You can find all of the information to do that at http://
nodejs.org/.
■ Install the serve package by running npm install -g serve from the command
line.
■ Download Angello Lite from GitHub, using the URL given above, and place it
on your local machine in a directory named angello-lite.
■ Navigate to the angello-lite directory from the command line and run serve.
■ Go to http://localhost:3000 in your browser to see the application.
Does learning Angular JS require previous exposure to node and git?
If I have Apache Tomcat already configured on my local m/c, what is the procedure to start with it?
Furthermore, just to keep in sync with the author, I installed git and then cloned a dir onto my local m/c from github.
Then i install node.js and Install the serve package by runningnpm install -g servefrom the command line.
Unfortunately when i navigate to the angello-lite directory from the command line and run serve, it shows me
where angello-lite is the repository where the application resides?
Any suggestions on how to configure successfully?
I have no idea regarding node.js and git. Do i really need to learn
these to begin with AngularJS then.
No, that's not a requirement. You don't even need a web server. You can have your static HTML files locally or use some online service like plnkr. Obviously if you need to work with dynamic data then you will need a web server. At some point you might want to start making AJAX calls in order to fetch some dynamic data from your server backend.
If I have Apache Tomcat already configured on my local m/c, what is
the procedure to start with it?
Just add an HTML page to the root of your website, open your favorite browser and invoke this page.
You don't need those tools to learn Angular - you can download latest package from the AngularJS website (both for development and for production).
Node.js and Git may be necessary to pull and build packages from the NPM, run tasks and many more great features, but just to learn Angular all you need is its code.
I've just used Yeoman to create an Angular project that looks great when I run grunt serve. But then I decided to view it by running http-server, and the page gets displayed without the formatting and without the images. Does anyone know why that is and if I'll run into this issue when I push it up to my web hosting server?
I discovered that I had to run grunt to build the project which fixes the references and places a distribution uglified version of the project in a dist folder. This ran just fine on my other server.
"Does anyone know why that is and if I'll run into this issue when I push it up to my web hosting server?"
Yes, you will run into this problem on your web hosting server.
grunt-serve serves the app used the setup on your local machine.
http-server mimics how a real web hosting server would evaluate your references.
My development routine is to use grunt-serve until I have a working version and then use http-server to test it out and see if it would work before I push it to my web hosting server. As #cdavid mentioned, running grunt build from your dist directory should be sufficient for general dependency issues.