@@ -9,8 +9,10 @@ You'll learn how to:
9
9
10
10
- Connect Coder to your Git provider;
11
11
- Create a workspace;
12
- - Add a sample project to your workspace;
13
- - Create a dev URL and preview changes to your project.
12
+ - Add [ Create React App] ( https://create-react-app.dev/ ) to your workspace, which
13
+ will allow you to create a sample single-page application that you can modify;
14
+ - Create a dev URL and preview changes to your project;
15
+ - Push your changes to a GitHub repo.
14
16
15
17
## Prerequisites
16
18
@@ -31,13 +33,7 @@ changes.
31
33
32
34
1 . Provide Coder with your SSH key to connect and authenticate to GitHub.
33
35
34
- If your site manager has configured OAuth, go to ** Linked Accounts** and
35
- follow the on-screen instructions to link your GitHub account.
36
-
37
- ![ Link GitHub account] ( ../assets/getting-started/linked-accounts.png )
38
-
39
- If your site manager has _ not_ configured OAuth, go to ** SSH keys** . Copy
40
- your public SSH key and
36
+ Go to ** SSH keys** . Copy your public SSH key and
41
37
[ provide it to GitHub] ( https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account ) .
42
38
43
39
![ Add SSH key] ( ../assets/getting-started/ssh-keys.png )
@@ -53,7 +49,7 @@ You will now create the workspace where you'll work on your development project.
53
49
1 . Provide a ** Workspace Name** .
54
50
55
51
1 . In the ** Image** section, click ** Packaged** (this tab contains
56
- Coder-provided images hosted in a Docker registry). Select ** Ubuntu ** . This
52
+ Coder-provided images hosted in a Docker registry). Select ** NodeJS ** . This
57
53
will populate the form in the ** Import** tab.
58
54
59
55
1 . Under ** Workspace providers** , leave the default option (which is ** Docker** )
@@ -85,15 +81,15 @@ sample project to your workspace.
85
81
1 . Click the hamburger icon in the top right, and select ** Terminal** > ** New
86
82
Terminal** to open a new terminal.
87
83
88
- 1 . Clone the ` create-react- app ` repository :
84
+ 1 . You're now ready to create a demo app that you can modify :
89
85
90
86
``` console
91
- git clone git@github.com:facebook/create-react-app.git
87
+ npx create-react-app my-app
88
+ cd my-app
92
89
```
93
90
94
- Once you've cloned the repository, you can click the ** Explorer** icon and
95
- expand the ** create-react-app** folder in the left-have nav bar to see the
96
- contents of the repo.
91
+ Once done, you can expand the ` my-app ` folder in the left-have nav bar to see
92
+ its contents:
97
93
98
94
![ View files] ( ../assets/getting-started/view-files.png )
99
95
@@ -118,8 +114,6 @@ specified and renders a browser link you can use to view your application.
118
114
Web window and running the following in the terminal:
119
115
120
116
``` console
121
- npx create-react-app my-app
122
- cd my-app
123
117
npm start
124
118
```
125
119
@@ -133,3 +127,32 @@ specified and renders a browser link you can use to view your application.
133
127
preview will update.
134
128
135
129
![ Preview changes] ( ../assets/getting-started/hello-world.png )
130
+
131
+ ## Step 5: Push your repo to GitHub
132
+
133
+ The follow steps show you how to push your app to a newly created GitHub repo.
134
+
135
+ 1 . Log in to GitHub and navigate to
136
+ [ Create a new repository] ( https://github.com/new ) .
137
+
138
+ 1 . Provide a ** repository name** and click ** Create repository** .
139
+
140
+ 1 . Return to your workspace, run the following in your terminal to add a remote
141
+ to your GitHub repo, change the primary branch name to ` main ` , and push the
142
+ contents to your newly created repo:
143
+
144
+ ``` console
145
+ git remote add origin https://github.com/<username>/<repoName>.git
146
+ git branch -M main
147
+ git push origin main
148
+ ```
149
+
150
+ 1 . Next, Code Web will display an alert that says the GitHub extension wants to
151
+ sign in; click ** Allow** to proceed.
152
+
153
+ 1 . Within the IDE window (near the top), you'll be prompted to provide your
154
+ GitHub Personal Access token
155
+
156
+ ![ GitHub Personal Access Token] ( ../assets/getting-started/gh-access-token.png )]
157
+
158
+ At this point, the contents of your repo should be pushed to GitHub.
0 commit comments