I messed up. I needed to reset my computer and wipe it clean. In doing so, I mistakenly committed incorrect code (a lot of it) to source control. Now, going to retrieve it and discovering its the wrong stuff. I have the correct code published - Is it at all possible to get this code that's up in Azure?
You can download a copy of the deployed code via the KUDU interface. Please note that this is the deployed code, and it won't be the source if you are using a compiled language such as C#.
Please see this blog for details on how to access the KUDU interface. If you click on debug console and then powershell, you will see a file browser (picture shown at bottom of blog post). There is a download button for each folder. Simply navigate to where your files are stored and download.
Yup. Assuming you want the repo not the deployed (compiled) code- Go into Kudu/DebugConsole and grab the repository folder from /site/.
It has a clone of your local git repo in it.
Related
My ultimate goal is to simply edit the package.json file to add the momentjs library so I can access it my node red app running in bluemix, but my question is even more fundamental.
My setup:
I have a bluemix nodejs app running a simple node red app I created. I want to use the moment.js library to do some date math and understand I need to update the dependencies file in the package.json file.
Question:
When I go to my Bluemix console runtime screen for node.js I can see the package.json file and can click on it to see the contents, but can't edit. I have tried creating projects/Git and can't see this file. I can use CLI using CF and get to the file and view it but again I just don't know how to edit it.
I would really like to understand how I can see these files and edit/source code control them using the Web IDE and just can't figure it out. I do fundamentally understand source code control just don't understand how to set this all so I can specifically see this file.
Main goal is simply to update the package.json file in the app directory.
In your Bluemix Dashboard,click on your APP and in the APP Overview you will see ADD GIT BUTTON(top right corner).
Click on it and once you've added your project to GIT, you will get a GIT URL.
Go to that URL and click on EDIT CODE( you can update your package.json) and then commit the changes.
I have a project Pyramid Application. I store it on git and pull the branch to the server when I need update. Until now I was working on Koding but lately decided to check out azure and it's developer's benefits.
After I've created ubuntu server virtual machine (which actually is what runs under Koding) I've downloaded my project using git pull, but forgot to change the branch to the one I'm working on atm. So I did, but server still shows me the old page (like I didn't checkout the other branch). So I checked sftp and files show me they have been updated.
Why am I still seeing the old page?
Now I know the reason why! (at least I think, but please. correct me if I'm wrong)
I noticed that there was .pyc file for every .py file, and those are "compiled" (bit of simplification?) python files as I understood it. And it seemed to me that they were not "compiled" on app launch. But they compiled with setup.py... edit dates suggest that.
So the reason why I didn't see the changes I did in code was that... http.server was using old "compiled" files instead of the source files! But is that normal/expected behaviour? Dunno. There are many other quetions now, but main question was answered so I mark this as answer until someone gives better answer.
I dropped my hard drive which contained all my code and now it won't plug in to my computer. I need the code to my Azure website which I deployed earlier asap. Is there a way for me to access this code?
Yes, there are multiple ways.
Using the deployment credentials you can connect via FTP and download the files.
Using Git source control you can add your azure web app as a remote reference and clone it locally.
It's not going to be pretty but once you get your binaries via FTP you can use a Reflector library to decompile your binaries and generate source code from them.
It won't be as good as the original source code, but it'll be functionally equivalent and will make it easier for you get back to where you were.
I use Azure websites and my project must have an empty folder on the server. When I publish the project from the Solution Explorer (VS 2013), I don't get it created on the server.
For now, I keep an empty file there to force the creation but I was wondering if there is a proper way to make the publish process create it for me.
Assuming you are WebDeploy from VS to publish your site, I think the only way to force creating a folder is to have it on your client side. If you use kudu you can look at post deployment actions
I would suggest updating your code though to create the folder if it doesn't exist. That would make your code more robust and self contained rather than depending on a certain deployment mechanism to create the folder for you.
I was thinking to use dropbox to upload my source code of a web-application. For this folder i would create a shared link. This link i like to use to download all the latest source files on my test server (instead of using s/FTP).
Now i know you can use dropbox with linux by installing their version, but it requires to create account. I don't want to use a account, and for sure don't want to use my own account.
Is there anyway to use a shared (folder) link, and download all the files in that folder command-line, without a account (maybe something like wget) ? There is no need for live-syncing, it would be fine to trigger the download with some bash script.
Thanks.
If you're ok with your links being public (which i think is not a good idea) , then you can just create a file with a list of links to your files and then create a bash script to loop over each line of the file get the link with wget
If you want to use authentication, you'll have to register for a Dropbox API key and then create a script (in python,ruby or java etc) to authenticate and get the files.
If you don't have a specific need for dropbox, i'll recommend you use git (or similar). With git you'll just have to create the repository on your server and clone it on your desktop. Then you can just edit your files and push it to the server.... it's so much easier.
Rogier, github has become the norm for hosting code. There are other options (Sourceforge, Google Code, Beanstalk) or you can set up a private git repository on your own computer.
Somewhere deep in my browser history there's an article about how to do that.
However a little googling turned up http://news.ycombinator.com/item?id=1652414. Let me know if you can't find some satisfactory instructions on your own of how to set up a git repo on your computer.