1 00:00:00,260 --> 00:00:03,290 Once you're finished writing your code with workspaces, 2 00:00:03,290 --> 00:00:06,860 you can preview your website or web application and 3 00:00:06,860 --> 00:00:11,170 you can also take a snapshot to share the workspace with others. 4 00:00:11,170 --> 00:00:11,710 Lets take a look. 5 00:00:12,730 --> 00:00:16,040 I'm going to click on this workspace to open it up. 6 00:00:16,040 --> 00:00:19,340 But you could be using any workspace that you like. 7 00:00:19,340 --> 00:00:22,470 Down at the bottom, I'm going to close the console window for 8 00:00:22,470 --> 00:00:24,950 now, because I won't need it just yet. 9 00:00:24,950 --> 00:00:29,430 And in the upper right corner, you'll notice that we have a few icons here. 10 00:00:29,430 --> 00:00:32,570 We've already learned about forking and here, 11 00:00:32,570 --> 00:00:37,510 I can fork a workspace directly from inside the workspaces interface. 12 00:00:37,510 --> 00:00:41,470 But I can also preview this workspace. 13 00:00:41,470 --> 00:00:46,250 So this is a simple HTML and CSS website that I've created. 14 00:00:46,250 --> 00:00:49,590 And as you might expect with an HTML website, 15 00:00:49,590 --> 00:00:52,760 the index page is the default page. 16 00:00:52,760 --> 00:00:57,680 So when i click on the Preview button, it will open up this website and 17 00:00:57,680 --> 00:01:00,740 bring me to index.html. 18 00:01:00,740 --> 00:01:05,790 This allows you to preview your site as you're working with your code, but 19 00:01:05,790 --> 00:01:09,490 these preview URLs are short-lived. 20 00:01:09,490 --> 00:01:12,950 So while it looks like you could copy and paste this and 21 00:01:12,950 --> 00:01:16,830 share it in a tweet, or share it in the Treehouse community. 22 00:01:16,830 --> 00:01:20,780 You don't wanna do that because as soon as you close your workspace, 23 00:01:20,780 --> 00:01:24,400 these preview URLs will expire. 24 00:01:24,400 --> 00:01:27,750 So you don't want to share a preview URL. 25 00:01:27,750 --> 00:01:33,260 It's just for previewing your workspace while you're writing code. 26 00:01:33,260 --> 00:01:40,160 However, if you would like to share your workspace with other Treehouse students. 27 00:01:40,160 --> 00:01:46,920 You can click on the Snapshot button and click the button that says Take Snapshot. 28 00:01:48,380 --> 00:01:51,380 This will create a snapshot of your 29 00:01:51,380 --> 00:01:55,940 current workspace in whatever state it's in right now. 30 00:01:55,940 --> 00:02:01,420 And then, you can click on this link to view the snapshot. 31 00:02:01,420 --> 00:02:05,980 And this link, you can share in the Treehouse community. 32 00:02:05,980 --> 00:02:11,796 And when people click on it, they'll see a screen that looks just like this. 33 00:02:11,796 --> 00:02:16,712 This is great if you want to share your workspace with other Treehouse students. 34 00:02:16,712 --> 00:02:21,490 Especially if you're stuck on a big problem and you need some help with it. 35 00:02:21,490 --> 00:02:25,930 That way, other Treehouse students can see exactly what you're working on. 36 00:02:25,930 --> 00:02:30,280 In addition, you can also fork snapshots. 37 00:02:30,280 --> 00:02:33,740 So, when somebody else on Treehouse opens up your workspace. 38 00:02:33,740 --> 00:02:39,670 They could click on Fork Snapshot, maybe fix whatever problem you're having. 39 00:02:39,670 --> 00:02:44,190 And then share the workspace back with you to show you the solution. 40 00:02:44,190 --> 00:02:48,313 For now, I'm going to close this snapshot and 41 00:02:48,313 --> 00:02:53,504 then I can actually delete snapshots from that same menu. 42 00:02:53,504 --> 00:02:57,970 The last thing I want to show you is the console in workspaces. 43 00:02:57,970 --> 00:03:01,600 So let me close this particular workspace and 44 00:03:01,600 --> 00:03:04,280 I'm going to open this Python Workspace. 45 00:03:05,730 --> 00:03:10,120 Workspaces is great for creating simple HTML and simple CSS websites. 46 00:03:10,120 --> 00:03:16,010 But you can also work with numerous back end languages, like Python, Ruby or PHP. 47 00:03:16,010 --> 00:03:22,650 Here, I have a simple Python application that's written in flask and 48 00:03:22,650 --> 00:03:27,920 I can actually run this Python application from the console. 49 00:03:29,420 --> 00:03:32,100 If you console is closed and you can't see it, 50 00:03:32,100 --> 00:03:37,200 you can go up to the View menu and choose Show Console. 51 00:03:38,520 --> 00:03:44,240 You can also adjust the size of the console relative to the text editing area. 52 00:03:44,240 --> 00:03:47,710 If you want some more space to work in your console. 53 00:03:47,710 --> 00:03:53,350 If you haven't worked with back end languages before, you need to start 54 00:03:53,350 --> 00:03:58,890 a server in order to run any kind of web application that you write. 55 00:03:58,890 --> 00:04:06,435 So from the console, I can type in python, because I'm running a Python application. 56 00:04:06,435 --> 00:04:11,445 And then I can choose which application I want to run, I only have one here. 57 00:04:11,445 --> 00:04:20,200 So I'm going to run this simple_app.py for Python and then hit Enter. 58 00:04:20,200 --> 00:04:26,430 And the console will tell me that it's now running on port 8000 and 59 00:04:26,430 --> 00:04:32,430 I can hit Ctrl+C to quit the application and stop it from running. 60 00:04:32,430 --> 00:04:38,530 Then in the upper right, when I click on the Preview button, it will give me a list 61 00:04:38,530 --> 00:04:43,940 of ports because you could be running several applications on different ports. 62 00:04:45,050 --> 00:04:50,210 So now when I click on port 8000, it will open the Preview window. 63 00:04:50,210 --> 00:04:53,463 And this is just a very simply Python application that 64 00:04:53,463 --> 00:04:55,498 just says hello from Treehouse. 65 00:04:55,498 --> 00:04:59,510 But you can see a preview of your application running. 66 00:04:59,510 --> 00:05:03,040 Hopefully this tour of workspaces has been useful to you. 67 00:05:03,040 --> 00:05:07,960 As you go through more Treehouse courses, you'll learn more about workspaces and 68 00:05:07,960 --> 00:05:09,810 become much more comfortable using it.