I'm using Appengine and I want to write a custom admin page for myself. How can I view the custom admin page on the development server (on my localhost)?
The localhost console does not seem to have a link to it (even though it's defined in the .yaml and the page is working properly).
Thanks
Enter the URL in your browser, i.e.
http://localhost:8080/MyAdminPage.html
Related
Hi I am creating an app which have 3 parts- Admin, Client and User. Admin has all the features, while client has some of the features while client has some. So I thought to have a common code base and will be providing access based on subdomain.
Now I could not find any suitable article across the internet for the same.
Lets say the user clicks the link admin.company.in/login it will open admin login page.
Similarly, client.company.in/login will open client's login page
How can I achieve this and also test it locally?
React has nothing to do with this. You have to build two different react applications and server them client.company.in and admin.company.in respectively. To achieve this you have to deploy the application to the server and server with webserver (eg:nginx).
I have an application which has a landing page developed using AngularJS. The login screen is developed using AngularJS and when the user logs in, the token should be saved in local storage and go to the landing page.In that Landing page there is a button. When I press that button the page should route to a page which is developed using ReactJS which runs on a different server running in a different port .
(Eg. React app in port 3000 and Angular port is 4000)
When the page is redirected to the ReactJS page, that page should be able to access that user token which we previously saved in local storage . Also I want to know the security aspect of saving the token in local storage and is there any other alternatives to do that.
OK.. not sure if this will suffice as an answer, but why do you want it to run on two separate ports? I have worked on such a project and in my case it was like this..
MYAPP/landing - developed in angular
MYAPP/dashboard - developed in react
so, basically I have the React prod build in one of my subdirectories and the Angular prod build in the rootDirectory and had configured in my server config files to handle the requests accordingly(I used apache websever)..
I am hosting a web application on Azure - I deployed it yesterday by just copying all the required files into wwwroot.
It sort of works - except that it behaves differently than when it did when I just ran npm start locally (it's an Angular 2 app, with config copied from the 5 min quickstart guide) - when I ran it locally, I could manually enter any URL which was handled by routers and it did load, and on Azure it throws a 404 (also happens when I just refresh any page besides the home page) - I presume that somehow when I ran it locally, it figured out that I always need to load index.html, regardless of the actual URL, and let the router handle everything. How can I replicate this behavior on Azure?
Your Azure WebApp is running on an IIS instance by default.
If you want to handle the Html5 Mode(without the hashbang) then you have to create a Web.Config file and define a rewrite.
See How do I configure IIS for URL Rewriting an AngularJS application in HTML5 mode?
Dont forget to set <base href="/"> in the <head> of your index.html. Otherwise it wont work.
I think you will probably have to use URL Rewrite for this, unless you are using MVC to deliver the page. Here is a previous answer that will help you configure URL Rewrite. It is talking about WordPress, but it should point you in the right direction.
You should try checking the Azure portal under the Application Settings for the Web Application if .index.html is included in the List of Default Document option
I would be glad if you can rephrase your Question to understand it more.
I created a very simple FireBase + Angular app with AngularFire, or rather, I copied the code from the examples. All it does, for now, is allow logging in and out via Google. The code is so simple I don't think there's even a need to post it here.
I tried it on different static files hosting solutions, and got somewhat weird results.
On Google Drive, Dropbox, and Github. Though the pages were served on all of them, no 404 error and no JS errors in the console, the login itself didn't work. What would happen is that the program would launch the login screen and log in the user, but then the angular "auth.user" object stayed null.
The same code exactly, when run on Visual Studio (just by "view file in browser") and also hosted on FireBase's own hosting solution, ran as expected, no problems. Logging in and logging out both worked.
I wondered how that could be, since this is a "no backend" app, or, more precisely, it has the same back-end, i.e. FireBase services.
What is happening here?
explanation on hosting on Google Drive
explanation on hosting on Dropbox and Github
(comments on how to improve this question will be appriciated)
You have to liste the domains that will host your app in the settings of FireBase.
It is in the login and auth tab, the "Authorized Domains for OAuth Redirects" field.
You should put there the domains you want to use, like dropbox.com, etc...
Details here : https://www.firebase.com/docs/web/guide/user-auth.html#section-configuring
Your code works on your local Visual Studio because localhost and 127.0.0.1 are enabled by default.
If I am at site abc.com and I go to my site def.com which hosts a silverlight app. How can I find out which domain I just came from within my silverlight app?
Assuming you got to your site via a link (this does not work if you simply typed in your website address), your hosting ASPX page on def.com will receive a referring URL.
You then just need to pass it into the Silverlight application via the InitParams setting of the Silverlight control.
See the HttpRequest.UrlReferrer Property and this example on how to pass the property to Silverlight.
You can't. You will have to use Javascript for that and even then you won't be able to see from which site the user came, you can just go back to the previous page.
You can do it on the server side by checking the web server logs.