I have made a web app with angular 5 and a Codeigniter Rest (two separated folders) and now i want to put it on a free host to try it.
But someone told me to integrate my front part (angular) inside my back part (codeigniter). But i can't figure this out.
Does someone have some link for a tuto about this please ?
You can host your both backend and front end in apache server. Put the backend code in the home dir inside some other folder. For angular you can try the command from the root dir of angular from your local machine ng build --prod make sure to change the api urls in it to the hosted php url. Once the build is completed it will create a folder named dist. You can copy that into your websites public directory. Please keep in mind that once you made a change you have to take build again and upload it. I don't know any other ways exists for that. For the backend upload your db and change it's settings accordingly first. Make sure you are able to call the api.
Related
I have setup a custom storefront for my hybris project.
I have added a react project(package.json is the custom storefront's folder) within WEB-INF folder.
Using webpack to bundle and code split my js and css.
Is there a way to host the HTML file within Hybris 6.7?
P.S - can't do a separate frontend project, hence this question.
I'm not sure I understand what you are looking for, but you can create a new extension with a web module. This web module can have a page.
See Extension Modules: https://help.sap.com/viewer/b490bb4e85bc42a7aa09d513d0bcb18e/6.7.0.0/en-US/3a3b92d4900b4b3685157b806a73eab2.html
Intro:
Currently, I have two separate projects.
One solution is for .NET core Web API 2.0 and another project is Angular 6 app.
I have a problem deploying this to my hosting provider ( asphostsportal ).
It consists of one root folder httpdocs where when I publish my API I copy contents of publishing folder.
After transferring files via FTP I confirm that my API works by sending a request and getting the response.
Now I need to publish my angular project.
The simplest way to do so is with ng build and I get some folder in dist.
Problem:
If I transfer contents of the folder inside dist to my root folder httpdocs on server It can't find any page but API still works.
If I transfer the whole folder inside httpdocs and set server Host setting to define document root to that folder:
It will find the index.html and show me my landing page.
However then API won't work.
If I leave it as is and change the document root back to httpdocs ( where the API files are ) but push the index.html from httpdocs/website to httpdocs ( in this case I also edit index.html to point to website folder for resources etc ) in the hope it will find it ( server IIS setting )
It doesn't. After that my API starts working again. However, no landing page to be found.
Just FYI I do not have any extra startup.cs lines of code that have anything to do with static files nor did my publish command on API project create wwwroot folder ( like mentioned here)
Edit (Solution):
Okay, so I got it to work.
1) I added 2 lines of code in Configure method of Startup.cs in my API
app.UseDefaultFiles();
app.UseStaticFiles(); // For the wwwroot folder
Where according to MSDN
"With UseDefaultFiles, requests to a folder search for: index.html"
2) I manually added wwwroot folder which for some reason was not generating upon publishing command for my API project.
3) In that folder I copied all contents of my dist/website angular publish files
And now it works, cheers!
I'm working on an android app with Ionic 3 connected with Laravel to control my data through an api, and i'm trying to display a bunch of images on my ionic app, the problem is i can't.
I was trying to access laravel's storage folder but i can't, i don't know if it's possible to convert a blob image to json ...
Any ideas ? Thanks !
By default, laravel's storage folder can't be seen to the public web.
When you access your laravel app, you are actually accessing the 'public' folder of the root structure. Therefore, only the application has access to the storage folder.
Run the following in your command line in root folder
php artisan storage:link
This will create a symbolic link from public/storage to app/storage/public.
Now, you'll have to put your images inside the app/storage/public folder, and access them trough http://[yoursitehere].com/storage/image1.png
Looks like you need to link your storage directory to your public folder so it's accessible.
Link the storage folder:
php artisan storage:link
Get the image URL:
echo asset('storage/image.jpg');
Check the documentation here https://laravel.com/docs/5.5/filesystem#configuration
I created the whole responsive site in notepad - shop.html. I
can see its directory in rails. Put all my files in public folder of its rails app. Now I dont know how to load it in localhost:3000. How do i do that. Have configured everything. Rails server is running and It shows only the default index.html file. But when i write rails generate controller eshop. It says uninitialized constant welcome error.
PS: i m new to ruby.
All guides show how to create a new app but I couldnt find a way to load a html page already created in editor to load in browser using rails server.
Thanks in advance.
Since you generated a controller you need to put the content from your shop.html file into the /views/eshop/index.html.erb file
Open the routes file under config/routes.rb and change the following line
from:
root "welcome#index"
to:
root "eshop#index"
this way your app will point to the right file.
Subsequently you could just point the root to the shop.html file which I do not recommend. However you should definitely look into routing in rails and how it works.
I have my site up and running, but because of number of changes, i decided to publish an updated version. Before doing so i have made backup of my files and databases on the host, just in case.
Now this is what i did: Publish Nop.Web used FTP, configuration is set to release and from file publish options checked Delete all existing files prior to publish, as i was publishing to the same folder wwwroot. After publish was completed NopCommerce installation appeared (btw i would like to use the same db i used before) even tho settings.txt from the project I was publishing had the correct string path. I tried 2-3 times to pass the installation with no success (error: One or more sequence... something like that), checked settings.txt on the host and it was empty (no idea why), but i just edited it with the string path.
Now installation is gone i have my site running again with all the products and user information (i assume that means string path to db is good), but my theme is reseted to default, like all my changes to it (footer links, background, logo, favicon..etc etc) only thing that stayed as it should was the nivo slider widget that has the correct pictures displaying on this 'reseted' theme.
Checked General settings for theme settings if its the correct theme selected.
Also i have noticed this, i assume with those 2-3 unsuccesful install tried i have made some changes in db
http://i.imgur.com/wfXQYj6.png
Any suggestions how to sort this whole thing, before publishing i was running my site locally and it was good, i have backups of db and files(ones that i used before this publish)
I am using Nop version 3.4 and arvixe hosting. Sorry for my long post but i wanted to describe my steps and error as detailed as possible.
Thanks for reading and looking forward for your suggestions about this.
I haven't tried publishing features of NopCommerce version > 3.10, but you can try a more "manual" approach to make sure that files are properly updated on the server.
In short, you get files from your local machine which are needed for the built website and you upload them to your website folder on the server. You can make a backup and empty the server website folder first.
I presented that approach in this answer:
How to deploy nopCommerce 3.5 to new server from source?
You can check this batch script to see which files need to be sent to the server. The script also includes some suggestions about what else you may need to do to update the website on the server: https://gist.github.com/dan-mirescu/c14cc72e3f8ecca988b7
For Publishing the NopCommerce Application website below is the step:
Step : 1 - Publish the Nop.Web project.
Step : 2 - Publish the Nop.Admin project.
Go to the publish folder where your publish created
Step : 3 - Cut all dll from the Administration and Paste all dll to bin folder which in main bin folder for whole project
Step : 4 - Copy two things from your source project and in App_Data folder Settings.txt and InstalledPlugins.txt which is not published in your publish file so paste this two files in your publish folder in App_Data. (You need to change the connection string in Setting.txt as per your database host).
Step : 5 - Now you need to copy whole plugins folder from your source folder (but remember this plugins folder you need to copy from the Presentation folder not from the main source where the solution file are there.).
Step : 6 - Now your publish have been ready.(now you can deploy on hosting server)