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: src/content/3/en/part3b.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -506,24 +506,22 @@ You will probably have to do some small changes to the frontend, at least to the
506
506
507
507
#### 3.10 Phonebook backend step 10
508
508
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).
512
510
513
511
**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**.
514
512
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.
518
514
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.
520
516
521
517
#### 3.11 Full Stack Phonebook
522
518
523
519
Generate a production build of your frontend, and add it to the Internet application using the method introduced in this part.
524
520
525
-
**NB** If you use Render, make sure the directory <i>dist</i> is not ignored by git on the backend.
526
-
527
521
Also, make sure that the frontend still works locally (in development mode when started with command _npm run dev_).
528
522
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).
Copy file name to clipboardExpand all lines: src/content/3/en/part3d.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,9 +175,7 @@ Generate a new "full stack" version of the application by creating a new product
175
175
176
176
Push the latest version to Fly.io/Render and verify that everything works there as well.
177
177
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).
Copy file name to clipboardExpand all lines: src/content/3/fi/osa3b.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -426,7 +426,7 @@ Nyt myös frontend on kunnossa. Se toimii sekä sovelluskehitysmoodissa että tu
426
426
npm remove cors
427
427
```
428
428
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).
430
430
431
431
Sovelluksen tämänhetkinen koodi on kokonaisuudessaan [GitHubissa](https://github.com/fullstack-hy2020/part3-notes-backend/tree/part3-3), branchissa <i>part3-3</i>.
432
432
@@ -448,20 +448,22 @@ Joudut todennäköisesti tekemään frontendiin erinäisiä pieniä muutoksia ai
448
448
449
449
#### 3.10 puhelinluettelon backend step10
450
450
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).
454
452
455
453
**PRO TIP:** kun deployaat sovelluksen Fly.io:n tai Renderiin, kannattaa ainakin alkuvaiheissa pitää **KOKO AJAN** näkyvillä sovelluksen loki.
456
454
455
+
Testaa selaimen ja Postmanin tai VS Coden REST-clientin avulla, että Internetissä oleva backend toimii.
456
+
457
457
Tee repositorion juureen tiedosto README.md ja lisää siihen linkki Internetissä olevaan sovellukseesi.
458
458
459
459
#### 3.11 puhelinluettelo full stack
460
460
461
461
Generoi frontendistä tuotantoversio ja lisää se Internetissä olevaan sovellukseesi tässä osassa esiteltyä menetelmää noudattaen.
462
462
463
-
**HUOM:** eihän hakemisto <i>dist</i> ole gitignoroituna projektissasi jos käytät Renderiä?
464
-
465
463
Huolehdi myös, että frontend toimii edelleen myös paikallisesti.
466
464
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.
Copy file name to clipboardExpand all lines: src/content/3/fi/osa3d.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,8 @@ Generoi päivitetystä sovelluksesta "full stack" ‑versio, eli tee frontendist
168
168
169
169
Pushaa uusi versio Fly.io:n tai Renderiin ja varmista, että kaikki toimii myös siellä.
170
170
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.
0 commit comments