I am working on a basic Facebook chatbot, but ATM I need to deploy the code I want to test, and this means pull request, merge, deploy, bla bla.
Is there a way to expose a url from my vagrant box in order to speed up the development?
thanks
M
One of the best tool is probably https://ngrok.com/ that can help you open a tunnel between your local environment and the world. For Vagrant you can use Vagrant Share which uses ngrok see documentation here : https://www.vagrantup.com/docs/share/index.html
Related
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?
I apologize for the amateur nature of my question, but I am all rather new to this. So I have created a project within the cloud9 IDE, which is a website that connects to a mySQL database located on the same server. However, I wish to showcase the code that I have used to create the site. I have done a little research into doing this and so far I have found that GitHub Pages can allow you to host webcontent. Thus in theory I can just copy across the files from cloud9 to a GitHub repository. However, my site relies on being able to connect to and query a mySQL database. My question is, can and how would I connect my GitHub repo to such a database?
Any help/advice would be greatly appreciated! In addition, please let me know if I am barking up the wrong tree with this...
GitHub Pages are only for static HTML websites. It does not run any server side technology.
You must find web hosting based on the technology you used to create the website.
If you've been working on a server-side technology, then you could be running on localhost.
If thats the case, try tunnelling your localhost, which allows you to share your localhost with others on other networks.
localtunnel, ngrok and forward provide such technologies.
I'm trying to develop a website which uses Facebook Connect for authentication and other things. However, it seems that FBConnect in general requires the URL of the website to be the same one as you registered the app with. This is a problem, because although I'm running the site at
www.example.com
i am testing the site at
localhost:9000
So all the facebook stuff breaks on my local machine. Currently I'm simply working around this by doing testing on the actual server. So each time I want to test my code after doing stuff, I perform a
// local machine
git commit -a
git push origin master
// remote server
git pull origin master
Which apart from being annoying to do for every small change, is obviously going to be a problem when real people are actually reaching the website, and I want to continue development & testing without breaking it over and over while people are using it.
Is there a better way of doing this sort of thing? I'm sure others (i.e. everyone else who has ever used FBConnect) have run into this problem before. Is it possible to trick my DNS to point www.example.com at localhost during testing, so the Facebook Javascript is tricked to continue working?
One way around this is to edit your system's hosts file to point your domain to localhost. Add a line like this to your /etc/hosts file (or %SystemRoot%\system32\drivers\etc\hosts on windows):
127.0.0.1 www.yourdomain.com
Another approach is to create a second app on facebook for you in-development version, and use localhost as the URL for that version. Just don't forget to update the app id and secret to the production version when you deploy :)
The real answer here is to set up a staging server not located on your own localhost and create a staging application in FB pointing to that staging URL.
I like to use an entirely separate server for this purpose so I can develop and experiment at will without worrying about crashing my production application due to an errant loop or something.
--or--
Create a subdomain (staging.example.com) and stick a clone of your code in a separate root folder with the same directory structure as your application.
Yes, you will need some small conditional code to determine if you're looking at the staging or the production version of your site and then call the appropriate FB keys accordingly.
I ran into this problem when trying to move my code from development (localhost) to production. I was able to use localhost as the canvas url and my production domain for the secure canvas url. That way I was able to
I have doubts about how could I create objects, actions and aggregation and test it on development environment. Since facebook needs to scrap my webpage to get the object when i register an action. How could I configure my dev environment?
I've had my network guys poke a hole in the firewall to my dev server and have updated DNS point my development subdomain (ie dev.domain.tld).
Is it possible to develop facebook apps locally on my system so that the callback URL need not be a public URL like http://abc.com and instead can be an internal IP address like localhost http://127.0.0.1?
It is now possible to develop Facebook apps locally.
I believe this is true especially if you're developing in an iframe, which is now the standard way of developing facebook apps (FBML is deprecated).
In case this does not work, there are still some ways to make working more convenient.
Take a look at this answer:
Testing FB apps is still a rather primitive process.
I generally setup a test application that is a complete copy of the production settings inside the FB development environment that uses an SSH tunnel to point to my development server. You can setup as many applications as you need inside FB - I generally have a development application, a staging app and production. Staging and Production are both on "live" servers rather than an SSH tunnel.
The rest of the answers to this question detail different workflows that people have utilized to make it more convenient to develop on a remote host.
you can use http://127.0.0.1/ProjectName as the callback url, or your ip address itself