Skip to content

Commit 03944a7

Browse files
committed
Clarify instructions about deploying strategy in part3
1 parent fe62d78 commit 03944a7

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

src/content/3/en/part3b.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -506,24 +506,22 @@ You will probably have to do some small changes to the frontend, at least to the
506506
507507
#### 3.10 Phonebook backend step 10
508508
509-
Deploy the backend to the internet, for example to Fly.io or Render.
510-
511-
Test the deployed backend with a browser and Postman or VS Code REST client to ensure it works.
509+
Deploy the backend to the internet, for example to Fly.io or Render. If you are using Fly.io the commands should be run in the root directory of the backend (that is, in the same directory where the backend package.json is).
512510
513511
**PRO TIP:** When you deploy your application to Internet, it is worth it to at least in the beginning keep an eye on the logs of the application **AT ALL TIMES**.
514512
515-
Create a README.md at the root of your repository, and add a link to your online application to it.
516-
517-
**NOTE**: as it was said, you should deploy the BACKEND to the cloud service. If you are using Fly.io the commands should be run in the root directory of the backend (that is, in the same directory where the backend package.json is). In case of using Render, the backend must be in the root of your repository.
513+
Test the deployed backend with a browser and Postman or VS Code REST client to ensure it works.
518514
519-
You shall NOT be deploying the frontend directly at any stage of this part. It is just backend repository that is deployed throughout the whole part, nothing else.
515+
Create a README.md at the root of your repository, and add a link to your online application to it.
520516
521517
#### 3.11 Full Stack Phonebook
522518
523519
Generate a production build of your frontend, and add it to the Internet application using the method introduced in this part.
524520
525-
**NB** If you use Render, make sure the directory <i>dist</i> is not ignored by git on the backend.
526-
527521
Also, make sure that the frontend still works locally (in development mode when started with command _npm run dev_).
528522
523+
If you use Render, make sure the directory <i>dist</i> is not ignored by git on the backend.
524+
525+
**NOTE:** You shall NOT be deploying the frontend directly at any stage of this part. Only the backend repository is deployed throughout the whole part. The frontend production build is added to the backend repository, and the backend serves it as described in the section [Serving static files from the backend](/en/part3/deploying_app_to_internet#serving-static-files-from-the-backend).
526+
529527
</div>

src/content/3/en/part3d.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,7 @@ Generate a new "full stack" version of the application by creating a new product
175175

176176
Push the latest version to Fly.io/Render and verify that everything works there as well.
177177

178-
**NOTE**: you should deploy the BACKEND to the cloud service. If you are using Fly.io the commands should be run in the root directory of the backend (that is, in the same directory where the backend package.json is).
179-
180-
You shall NOT be deploying the frontend directly at any stage of this part. It is just backend that is deployed throughout the whole part, nothing else.
178+
**NOTE:** You shall NOT be deploying the frontend directly at any stage of this part. Only the backend repository is deployed throughout the whole part. The frontend production build is added to the backend repository, and the backend serves it as described in the section [Serving static files from the backend](/en/part3/deploying_app_to_internet#serving-static-files-from-the-backend).
181179

182180
</div>
183181

src/content/3/fi/osa3b.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Nyt myös frontend on kunnossa. Se toimii sekä sovelluskehitysmoodissa että tu
426426
npm remove cors
427427
```
428428
429-
Olemme nyt vieneet koko sovelluksen onnistuneesti internetiin. Deploymenttien toteuttamiseen on olemassa monenlaisia muitakin tapoja. Esimerkiksi frontendin koodin deployaaminen omana sovelluksenaan voi joissain tilanteissa olla järkevää, sillä se voi helpottaa automatisoidun [deployment pipelinen](https://martinfowler.com/bliki/DeploymentPipeline.html) toteuttamista. Deployment pipelinellä tarkoitetaan automatisoitua ja hallittua tapaa viedä koodi sovelluskehittäjän koneelta erilaisten testien ja laadunhallinnallisten vaiheiden kautta tuotantoympäristöön. Aiheeseen tutustutaan kurssin [osassa 11](https://fullstackopen.com/osa11).
429+
Olemme nyt vieneet koko sovelluksen onnistuneesti internetiin. Deploymenttien toteuttamiseen on olemassa monenlaisia muitakin tapoja. Esimerkiksi frontendin koodin deployaaminen omana sovelluksenaan voi joissain tilanteissa olla järkevää, sillä se voi helpottaa automatisoidun [deployment pipelinen](https://martinfowler.com/bliki/DeploymentPipeline.html) toteuttamista. Deployment pipelinellä tarkoitetaan automatisoitua ja hallittua tapaa viedä koodi sovelluskehittäjän koneelta erilaisten testien ja laadunhallinnallisten vaiheiden kautta tuotantoympäristöön. Aiheeseen tutustutaan kurssin [osassa 11](/osa11).
430430
431431
Sovelluksen tämänhetkinen koodi on kokonaisuudessaan [GitHubissa](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-3), branchissa <i>part3-3</i>.
432432
@@ -448,20 +448,22 @@ Joudut todennäköisesti tekemään frontendiin erinäisiä pieniä muutoksia ai
448448
449449
#### 3.10 puhelinluettelon backend step10
450450
451-
Vie sovelluksen backend Internetiin, esim. Fly.io:n tai Renderiin.
452-
453-
Testaa selaimen ja Postmanin tai VS Coden REST-clientin avulla, että Internetissä oleva backend toimii.
451+
Vie sovelluksen backend Internetiin, esim. Fly.io:n tai Renderiin. Jos käytät Fly.io:ta, komennot tulee suorittaa backendin juurihakemistossa (eli samassa kansiossa, jossa backendin <i>package.json</i>-tiedosto sijaitsee).
454452
455453
**PRO TIP:** kun deployaat sovelluksen Fly.io:n tai Renderiin, kannattaa ainakin alkuvaiheissa pitää **KOKO AJAN** näkyvillä sovelluksen loki.
456454
455+
Testaa selaimen ja Postmanin tai VS Coden REST-clientin avulla, että Internetissä oleva backend toimii.
456+
457457
Tee repositorion juureen tiedosto README.md ja lisää siihen linkki Internetissä olevaan sovellukseesi.
458458
459459
#### 3.11 puhelinluettelo full stack
460460
461461
Generoi frontendistä tuotantoversio ja lisää se Internetissä olevaan sovellukseesi tässä osassa esiteltyä menetelmää noudattaen.
462462
463-
**HUOM:** eihän hakemisto <i>dist</i> ole gitignoroituna projektissasi jos käytät Renderiä?
464-
465463
Huolehdi myös, että frontend toimii edelleen myös paikallisesti.
466464
465+
Jos käytät Renderiä, varmista, että hakemisto <i>dist</i> ole gitignoroituna projektissasi.
466+
467+
**HUOM:** Frontendiä ei julkaista suoraan missään vaiheessa tämän osan aikana. Vain backend-repositorio viedään Internetiin. Frontendin tuotantoversio lisätään backend-repositorioon, ja backend näyttää sen pääsivunaan kuten kohdassa [Staattisten tiedostojen tarjoaminen backendistä](/osa3/sovellus_internetiin#staattisten-tiedostojen-tarjoaminen-backendista) on kuvattu.
468+
467469
</div>

src/content/3/fi/osa3d.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ Generoi päivitetystä sovelluksesta "full stack" ‑versio, eli tee frontendist
168168

169169
Pushaa uusi versio Fly.io:n tai Renderiin ja varmista, että kaikki toimii myös siellä.
170170

171+
**HUOM:** Frontendiä ei julkaista suoraan missään vaiheessa tämän osan aikana. Vain backend-repositorio viedään Internetiin. Frontendin tuotantoversio lisätään backend-repositorioon, ja backend näyttää sen pääsivunaan kuten kohdassa [Staattisten tiedostojen tarjoaminen backendistä](/osa3/sovellus_internetiin#staattisten-tiedostojen-tarjoaminen-backendista) on kuvattu.
172+
171173
</div>
172174

173175
<div class="content">

0 commit comments

Comments
 (0)