I deployed a simple apollo grapqhl server to heroku (http://filex-database.herokuapp.com) but when I try to access the playground on my main machine the playground doesn't load and gets stuck at Loading Screen. The playground loads perfectly when I run the server locally.
The same heroku server works fine if I access it from my laptop though (and even another browser in my machine).
Maybe it's something to do with Chrome. But I don´t know where to start debugging.
I have faced this same problem recently.
After some research, it appears that I have to set some ENV VAR in order to correctly run GraphQL playground. On Heroku, I set the following:
GRAPHQL_PLAYGROUND_ENABLED=true
NODE_ENV=development
PRODUCTION=false
After that, I rerun the dynos of the app, and the playground loaded correctly.
From my understanding, it is not a good practice to serve GraphQL playground in production environment. So take care of flipping the ENV VAR for production, or even build an app for development, and another for production.
Hope it could help.
Related
Finally i completed my first full project using server, client, data
i would like to know few things about how to host and upload full website include(server ,react, mysql)
i so wondering how that is work, for now i understand that to upload a simple website you need a domain and to hosting, just do npm run build and upload it..., this is something that i know but, when that is not just a simple website like
when i have such as
server side with Node.js + express that have requests (on localhost) *probably need to change the localhost to something else but what
Database running with MySql
React app that have many request to (localhost)
how can i hosting all of them and running my website for everyone, i mean that my sql will still running, CRUD Data will update normal, and the server will still get request and send or update them to mysql data.
and if I'll want to make some change on mysql, server, client
i want to change it like i change it now
Actually i'm not a FullStack developer if i don’t know it... 🥶 so i really interesting to understand all of that issues
i hope you guys havק An understandable answer for me, thanks 🙏 and just take your time :)
Well, where to start hehe. There are a lot of different ways to host a web app. Heroku for example makes this process really simple.
Personally, I use Digital Ocean to host my apps. This is generally how that goes:
I have a project with a folder structure that seperates the server logic and the client logic.
Since you're using Node, you build your client with npm run build. Next make sure the dist/build folder is inside your server folder. That is the folder you are going to 'host'. On Digital Ocean, you make a new droplet (which basically is just a tiny part of a server).
You install Node, Git, Pm2 and (for example) Nginx. You clone your project from Github to the server and install all the dependencies.
You have to do a few configurations with nginx (specifying a domain name for example) to make everything work. This article goes into more detail about that.
Also, a database is frequently hosted seperately. You should read more about that.
If you have everything setup, you can just code on your project as usual. Push new updates to github, and pull in the changes on the server.
Here is another post on Stackoverflow talking about hosting MySql with react.
I've got my laravel project deployed on heroku, I finally got almost everything working, I have the Procfile which changes the home directory, and my CSS doesn't give mixed content errors anymore.
I've set up a database with db4free.net, and set up the env file accordingly, I've also set up the heroku config vars as well.
Using the Heroku CLI I ran bash, and migrated, this did create the tables correctly. The issue I'm facing now is that when I go to register, it seems to have worked and redirects to the homepage, however the data is never entered to the DB so I cannot log in with these details.
I haven't changed anything to do with the registering code thats provided in the auth package.
So it WAS all working, Heroku and especially db4free are pretty slow at updating
I am trying to launch game locally, but i have some problems.
Sources seems to be ok , down from github.
Here is one of these mistakes.
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Okay, thanks for the link to GitHub, I pulled the game down and reproduced the error. It seems strange to me that you wouldn't be able to get .gifs and .wavs when running locally, but there are legitimate security concerns with cross orgin requests, which is why most browsers are so locked down.
Luckily, there is a fairly simple solution to this problem, which I was able to confirm, at least on my end. It does involve running a server, but fortunately the basic Python library provides us with a very easy way to do run a local server. If you already have Python installed, you're ready to go, otherwise, go here: https://www.python.org/download/releases/2.7/
With python installed, its as easy as navigating to the folder containing your index.html file (like FlappyZozio-master) in your command prompt, and typing the following command:
python -m SimpleHTTPServer
Then you can access your game at the url: localhost:8000
There are other ways to set up local servers, as QUIPHOP mentioned, there's node for example. But I find Python to be easiest for quick testing purposes.
Seems like You haven't installed your game on the server. This is required for Phaser
When I was validation my Windows Store App I got the following error:
Application Error: Application Launch was not detected for application
App. This could be because your application failed to launch
correctly. Please consider re-running the test and avoid interacting
with the application while tests are running.
What does this mean? The app will not validate.
I thought it was a bit weird and I couldn't find anything when I googled it but people who had almost the same problem as me, though rather than launching it was failing to sleep. This was just plain odd.
I tried to launch the app from Visual Studio 2012 just to prove to myself that it did start properly and for some crazy reason it didn't work. I usually test the game on my Local Machine rather than the Simulator but now, for some reason, it was set to the Simulator and I have been having problems getting it to start lately (the simulator).
I changed it back to the local machine and ran the tests again. This time it worked.
So, if you get this error it might be time to see if your simulator works and if not, have the Local Machine set as default to run with.
Soo, I've decided to toy around a bit with GAE. Most of my previous experience with developing web-applications is with ASP.Net, so this java / eclipse-world is kinda unfamiliar to me.
I read around, and found out that I can configure my project to use a Google Cloud SQL instance when it's deployed at Google, while using a local MySQL database while running locally on my development server.
The problem I ran in to now is that I can simply not press "Ok" in the eclipse dialog for configuring my local MySQL database? Well - I can, but with no result. No error message, no window close, no nothing.
I'm not really sure what I am doing wrong, but was hoping some wiz in here who has more experience than me with GAE have had a similar problem and a solution?
I've attached a picture of my local MySQL configuration:
http://imgur.com/0tjK7Sf
Thanks in advance