You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/50-demo-app/2-start-app.mdx
+26-34Lines changed: 26 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,25 @@ import TabItem from '@theme/TabItem';
6
6
7
7
You have two options to start the application.
8
8
9
-
## Option 1: Run in a codespace
9
+
## Option 1: Run in Instruqt
10
10
11
-
By far, the easiest way to start the application is to run it in a codespace. A codespace is a cloud-hosted, containerized development environment that you can connect to from Visual Studio Code. It comes pre-configured with all the tools you need to build and run the application.
11
+
Instruqt is a lab platform that provides cloud-based sandboxes which come pre-configured with all the tools you need to run this lab.
12
12
13
-
In the case of this application, you can even use the online IDE to edit the code and see the changes reflected in the running application.
13
+
Navigate to the Instruqt lab using [this link](https://mdb.link/instruqt-library).
14
+
15
+
Fill out the form that appears and click **Submit and access**.
16
+
17
+
Click **Start** to launch the lab environment.
18
+
19
+
You should see a screen with a purple progress bar indicating that Instruqt is preparing a sandbox with all the required libraries for this lab and a MongoDB database.
20
+
21
+
Once this is done, you should see a **Start** button at the bottom right of the screen. Click this to enter the lab.
22
+
23
+
## Option 2: Run in a codespace
24
+
25
+
If Instruqt is not working for you, you can also use GitHub Codespaces. A GitHub Codespace is a cloud-hosted, containerized development environment that you can connect to from Visual Studio Code. It comes pre-configured with all the tools you need to build and run the application.
26
+
27
+
Similar to Instruqt, you can even use Codespaces as an online IDE to edit the code and see the changes reflected in the running application.
14
28
15
29
<TabsgroupId="server">
16
30
<TabItemvalue="node"label="🚀 NodeJS/Express">
@@ -21,43 +35,21 @@ To start the application in a codespace, click "Code." Then, look for the *Codes
Let it run for a few seconds as it prepares your environment. It will clone the repository, prepare the containers, and run the installation scripts. Once it's ready, you'll see an IDE, with a preview window that shows the running application.
38
+
Let it run for a few minutes as it prepares your environment. It will clone the repository, prepare the containers, and run the installation scripts. Once it's ready, you'll see an IDE, with a preview window that shows the running application.
25
39
26
40
:::note
27
41
Again, this might take a few minutes. It's a great time to grab a coffee. ☕️
Right now, you should see a big error message in the console, as we haven't configured the app yet. Don't worry, you'll get it up and running in a few minutes.
34
-
35
-
```
36
-
####### ###### ###### ####### ######
37
-
# # # # # # # # #
38
-
# # # # # # # # #
39
-
##### ###### ###### # # ######
40
-
# # # # # # # # #
41
-
# # # # # # # # #
42
-
####### # # # # ####### # #
43
-
```
44
-
:::
45
-
46
-
### Expose the server port
44
+
### Access the library website
47
45
48
-
To get the application working in that environment, there is one small change you need to make to the codespace. You need to expose the port where the server is running.
46
+
Once the environment loads, you may see the following warning:
49
47
50
-
Look for the *Ports* tab at the bottom of the IDE.
48
+
<Screenshoturl="https://github.com/mongodb-developer/library-management-system"src="img/screenshots/50-demo-app/2-start-app/7-visit-page.png"alt="A warning in the codespace saying 'You are about to access a development port served by someone's codespace'" />
You're seeing this warning because the development server is running on a publicly forwarded port, and GitHub shows a security notice anytime someone accesses a public port. Even in your own codespace, GitHub displays it just to confirm you intended to open that external-facing URL.
53
51
54
-
Once you click on the tab, you'll see a list of ports. Right-click on the port `Server (5000)` row. Then, select "Port Visibility" and "Public."
55
-
56
-
<Screenshoturl="https://github.com/mongodb-developer/library-management-system"src="img/screenshots/50-demo-app/2-start-app/4-port-visibility.png"alt="The Port Visibility menu" />
57
-
58
-
You'll see the text in the *Visibility* column change to `Public`.
59
-
60
-
That's it! You're now ready to move to the next section.
52
+
Click "Continue" to load the library application website. Once it loads, you're ready to move on to the next step.
61
53
62
54
63
55
</TabItem>
@@ -119,13 +111,13 @@ That's it! You're now ready to move to the next section.
119
111
</TabItem>
120
112
</Tabs>
121
113
122
-
## 🦸 Option 2: Run locally
114
+
## 🦸 Option 3: Run locally
123
115
124
-
If you prefer to run the application locally, you can do so by following these steps. Keep in mind that the following steps of this lab will be using the codespace, so you might need to adapt some of the commands.
116
+
If you prefer to run the application locally, you can do so by following these steps. Keep in mind that the following steps of this lab will be using Instruqt or the GitHub codespace, so you might need to adapt some of the commands.
125
117
126
118
:::info
127
119
128
-
During the lab, we will use GitHub Codespaces. These instructions are here just in case you can't use Codespaces or you _really, really, really_ want a local installation.
120
+
During the lab, we will use Instruqt or GitHub Codespaces. These instructions are here just in case you can't use Codespaces or you _really, really, really_ want a local installation.
0 commit comments