Skip to content

Commit ef28713

Browse files
committed
Merge branch 'source' of github.com:fullstack-hy2020/fullstack-hy2020.github.io into source
2 parents c633dda + d39c8f2 commit ef28713

File tree

11 files changed

+46
-33
lines changed

11 files changed

+46
-33
lines changed

src/content/0/en/part0b.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ Learn about the basics of HTML forms by reading Mozilla's tutorial [Your first f
653653
654654
<i>This exercise is not submitted to GitHub, it's enough to just read the tutorial</i>
655655
656-
<h4>0.4: New note</h4>
656+
<h4>0.4: New note diagram</h4>
657657
658658
In chapter [Loading a page containing JavaScript - review](/en/part0/fundamentals_of_web_apps#loading-a-page-containing-java-script-review) the chain of events caused by opening the page <https://studies.cs.helsinki.fi/exampleapp/notes> is depicted as a [sequence diagram](https://www.geeksforgeeks.org/unified-modeling-language-uml-sequence-diagrams/)
659659
@@ -692,11 +692,11 @@ The idea of these exercises is to read the text through once more, and to think
692692
693693
**Note** perhaps the best way to do diagrams is the [Mermaid](https://github.com/mermaid-js/mermaid#sequence-diagram-docs---live-editor) syntax that is now implemented in [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) markdown pages!
694694
695-
<h4>0.5: Single page app</h4>
695+
<h4>0.5: Single page app diagram</h4>
696696
697697
Create a diagram depicting the situation where the user goes to the [single page app](/en/part0/fundamentals_of_web_apps#single-page-app) version of the notes app at <https://studies.cs.helsinki.fi/exampleapp/spa>.
698698
699-
<h4>0.6: New note</h4>
699+
<h4>0.6: New note in Single page app diagram</h4>
700700
701701
Create a diagram depicting the situation where the user creates a new note using the single page version of the app.
702702

src/content/0/es/part0a.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Sin embargo, tenga en cuenta que la fecha límite para realizar el examen de cr
4141

4242
Las estadísticas del tiempo de finalización del ejercicio se pueden encontrar en el [sistema de presentación](https://studies.cs.helsinki.fi/stats/courses/fullstackopen).
4343

44+
### Canal de Discord y Telegram para el curso
45+
46+
Puede discutir sobre el curso y temas relacionados en nuestro grupo dedicado en Discord https://study.cs.helsinki.fi/discord/join/fullstack y en Telegram: https://t.me/fullstackcourse. Discord tiene canales fullstack_general y especifico para cada parte (nombres de canal con prefijo fullstack) para discusiones relacionadas con el curso. Tenga en cuenta que el canal chat del grupo no es adecuado para la discusión relacionada con el curso. ¡Únase a la conversación!
47+
4448
### Calificación
4549

4650
El curso se puede tomar como un curso más corto con un valor de 3 créditos o como el curso completo con un valor de 5-9 créditos, según la cantidad de ejercicios presentados.
@@ -136,7 +140,7 @@ Incluso si no se registra en Open University para el examen, aún puede descarga
136140

137141
Si ya ha realizado el curso como MOOC o como curso universitario, ahora puede ampliar su curso.
138142

139-
#### Ampliación desde Full stack open 2019 o 2020
143+
#### Ampliación en Full stack
140144

141145
¡Puede continuar donde lo dejó! Si desea volver a enviar una parte completa, comuníquese con el personal del curso a través de [correo electrónico](mailto:[email protected]) o Telegram [@mluukkai](https://t.me/mluukkai), con su nombre de usuario de Github y las partes que le gustaría eliminar de sus envíos.
142146

@@ -150,16 +154,9 @@ La "transferencia de crédito" de las partes completadas anteriormente ocurre en
150154

151155
Si ya aprobó el examen del curso (excluyendo el examen del curso de tres créditos) y ahora está ampliando su curso, no es necesario que vuelva a realizar el examen.
152156

153-
### Cambios desde el año 2019
154-
155-
- Solo hay cambios menores en las partes 0-4.
156-
- La parte 5d, <i>pruebas de extremo a extremo (end-to-end testing)</i> utilizando la biblioteca [Cypress.io](https://www.cypress.io), es material casi completamente nuevo. El uso de hooks personalizados se ha trasladado de la parte 5 a la parte 7 con contenido nuevo.
157-
- La Parte 6, que trata sobre Redux, se concentra en la nueva API Redux basada en hooks.
158-
- El material sobre react-router en la parte 7 también se ha actualizado para usar Hook API. Semantic UI React se ha reemplazado con la biblioteca MaterialUI debido a la falta de mantenimiento.
159-
- La Parte 8 de GraphQL tiene actualizaciones importantes, especialmente en Apollo Client, que finalmente tiene API estables basadas en Hooks.
160-
- La parte 9 de TypeScript, la parte 10 de React Native y la parte 11 de CI/CD es completamente nueva.
157+
### Continuando el curso en el año 2023
161158

162-
El material del curso del año pasado se puede encontrar [aquí](https://fullstackopen-2019.github.io/).
159+
La versión 2022 del curso finaliza el 1 de marzo de 2023. Al finalizar habrá una descanso de dos semanas por mantenimiento. Durante el descanso, el material permanece en línea y también se pueden enviar ejercicios. Durante el descanso el contenido del curso puede cambiar un poco, no se ha planeado nada demasiado dramático hasta el momento. Todos los ejercicios enviados para la versión 2022 se pueden usar en la edición 2023, por lo que básicamente se puede continuar el curso sin preocuparse demasiado por las diferentes versiones.
163160

164161
### Envío de ejercicios
165162

src/content/10/en/part10d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,6 @@ Because styled-components processes the style definitions, it is possible to use
11131113
11141114
That's it, our application is ready. Good job! We have learned many new concepts during our journey such as setting up our React Native application using Expo, using React Native's core components and adding style to them, communicating with the server, and testing React Native applications. The final piece of the puzzle would be to deploy the application to the Apple App Store and Google Play Store.
11151115
1116-
Deploying the application is entirely <i>optional</i> and it isn't quite trivial, because you also need to fork and deploy the [rate-repository-api](https://github.com/fullstack-hy2020/rate-repository-api). For the React Native application itself, you first need to create either iOS or Android builds by following Expo's [documentation](https://docs.expo.io/distribution/building-standalone-apps/). Then you can upload these builds to either Apple App Store or Google Play Store. Expo has a [documentation](https://docs.expo.io/distribution/uploading-apps/) for this as well.
1116+
Deploying the application is entirely <i>optional</i> and it isn't quite trivial, because you also need to fork and deploy the [rate-repository-api](https://github.com/fullstack-hy2020/rate-repository-api). For the React Native application itself, you first need to create either iOS or Android builds by following Expo's [documentation](https://docs.expo.io/distribution/building-standalone-apps/). Then you can upload these builds to either Apple App Store or Google Play Store. Expo has [documentation](https://docs.expo.io/distribution/uploading-apps/) for this as well.
11171117
11181118
</div>

src/content/11/en/part11c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ flyctl auth token
7474

7575
You'll need the token soon for your deployment workflow!
7676

77-
Before setting up the deployment pipelinem let us ensure that a manual deployment with the command <i>flyctl deploy</i> works.
77+
Before setting up the deployment pipeline let us ensure that a manual deployment with the command <i>flyctl deploy</i> works.
7878

7979
You most likely need to do at least two changes. Firstly, define the Node version to use in the file <i>package.json</i> to match one used in your machine. For me it is 16.13.2:
8080

src/content/12/en/part12c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ $ docker run -p 3000:3000 -v "$(pwd):/usr/src/app/" hello-front-dev
218218

219219
Now we can edit the file <i>src/App.js</i>, and the changes should be hot-loaded to the browser!
220220

221-
Note that it takes some time (for me it took 50 seconds!) for the frontend to started with _npm start_ in the development mode. The frontend is has started when the following appears in the container log:
221+
Note that it takes some time (for me it took 50 seconds!) for the frontend to get started with _npm start_ in the development mode. The frontend has started when the following appears in the container log:
222222

223223
```bash
224224
You can now view hello-frontend in the browser.

src/content/2/es/part2b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ const addNote = (event) => {
244244
}
245245
```
246246

247-
Primero creamos un nuevo objeto para la nota llamado <em>noteObject</em> que recibirá su contenido del esatdo del componente <em>newNote</em>. El identificador único <i>id</i> se genera en función del número total de notas. Este método funciona para nuestra aplicación ya que las notas nunca se eliminan. Con la ayuda de la función <em>Math.random()</em>, nuestra nota tiene un 50% de posibilidades de ser marcada como importante.
247+
Primero creamos un nuevo objeto para la nota llamado <em>noteObject</em> que recibirá su contenido del estado del componente <em>newNote</em>. El identificador único <i>id</i> se genera en función del número total de notas. Este método funciona para nuestra aplicación ya que las notas nunca se eliminan. Con la ayuda de la función <em>Math.random()</em>, nuestra nota tiene un 50% de posibilidades de ser marcada como importante.
248248

249249
La nueva nota se agrega a la lista de notas usando el método de matriz [concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat), introducido en la [parte 1](/es/part1/java_script#arrays):
250250

src/content/2/fi/osa2b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const addNote = (event) => {
240240

241241
Ensin luodaan uutta muistiinpanoa vastaava olio <em>noteObject</em>, jonka sisältökentän arvo saadaan komponentin tilasta <em>newNote</em>. Yksikäsitteinen tunnus eli <i>id</i> generoidaan kaikkien muistiinpanojen lukumäärän perusteella. Koska muistiinpanoja ei poisteta, menetelmä toimii sovelluksessamme. Komennon <em>Math.random()</em> avulla muistiinpanosta tulee 50 %:n todennäköisyydellä tärkeä.
242242

243-
Uusi muistiinpano lisätään vanhojen joukkoon oikeaoppisesti käyttämällä [osasta 1](/osa1/javascriptia#taulukot) tuttua taulukon metodia [concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat):
243+
Uusi muistiinpano lisätään vanhojen joukkoon oikeaoppisesti käyttämällä [osasta 1](/osa1/java_scriptia#taulukot) tuttua taulukon metodia [concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat):
244244

245245
```js
246246
setNotes(notes.concat(noteObject))

src/content/8/en/part8a.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ Let's implement a GraphQL server with today's leading library: [Apollo Server](h
250250
Create a new npm project with _npm init_ and install the required dependencies.
251251

252252
```bash
253-
npm install apollo-server graphql
253+
npm install @apollo/server graphql
254254
```
255255

256256
Also create a `index.js` file in your project's root directory.
257257

258258
The initial code is as follows:
259259

260260
```js
261-
const { ApolloServer, gql } = require('apollo-server')
261+
const { ApolloServer, gql } = require('@apollo/server')
262262

263263
let persons = [
264264
{
@@ -717,7 +717,7 @@ The errors from those rules are handled by [the error handling mechanism of Apol
717717
Let's block adding the same name to the phonebook multiple times:
718718

719719
```js
720-
const { ApolloServer, UserInputError, gql } = require('apollo-server') // highlight-line
720+
const { ApolloServer, UserInputError, gql } = require('@apollo/server') // highlight-line
721721

722722
// ...
723723

src/content/8/en/part8c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ We also included a few validations. _required: true_, which makes sure that a va
5555
We can get the application to mostly work with the following changes:
5656

5757
```js
58-
const { ApolloServer, UserInputError, gql } = require('apollo-server')
58+
const { ApolloServer, UserInputError, gql } = require('@apollo/server')
5959
const mongoose = require('mongoose')
6060
const Person = require('./models/person')
6161

src/content/8/en/part8e.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Let us start by extracting the schema definition to file
142142
<i>schema.js</i>
143143

144144
```js
145-
const { gql } = require('apollo-server')
145+
const { gql } = require('@apollo/server')
146146

147147
const typeDefs = gql`
148148
type User {
@@ -198,7 +198,7 @@ module.exports = typeDefs
198198
The resolvers definition is moved to the file <i>resolvers.js</i>
199199

200200
```js
201-
const { UserInputError, AuthenticationError } = require('apollo-server')
201+
const { UserInputError, AuthenticationError } = require('@apollo/server')
202202
const jwt = require('jsonwebtoken')
203203
const Person = require('./models/person')
204204
const User = require('./models/user')
@@ -311,15 +311,18 @@ module.exports = resolvers
311311
Next we will replace Apollo Server with [Apollo Server Express](https://www.apollographql.com/docs/apollo-server/integrations/middleware/#apollo-server-express). Following libraries are installed
312312

313313
```
314-
npm install apollo-server-express apollo-server-core express @graphql-tools/schema
314+
npm install express cors body-parser @graphql-tools/schema
315315
```
316316
and the file <i>index.js</i> changes to:
317317

318318
```js
319-
const { ApolloServer } = require('apollo-server-express')
320-
const { ApolloServerPluginDrainHttpServer } = require('apollo-server-core')
319+
const { ApolloServer } = require('@apollo/server')
320+
const { expressMiddleware } = require('@apollo/server/express4')
321+
const { ApolloServerPluginDrainHttpServer } = require('@apollo/server/plugin/drainHttpServer')
321322
const { makeExecutableSchema } = require('@graphql-tools/schema')
322323
const express = require('express')
324+
const cors = require('cors')
325+
const bodyParser = require('body-parser')
323326
const http = require('http')
324327

325328
const jwt = require('jsonwebtoken')
@@ -367,14 +370,27 @@ const start = async () => {
367370
},
368371
plugins: [ApolloServerPluginDrainHttpServer({ httpServer })],
369372
})
373+
374+
app.use(
375+
'/',
376+
cors(),
377+
bodyParser.json(),
378+
expressMiddleware(server, {
379+
context: async ({ req }) => {
380+
const auth = req ? req.headers.authorization : null
381+
if (auth && auth.toLowerCase().startsWith('bearer ')) {
382+
const decodedToken = jwt.verify(auth.substring(7), JWT_SECRET)
383+
const currentUser = await User.findById(decodedToken.id).populate(
384+
'friends'
385+
)
386+
return { currentUser }
387+
}
388+
},
389+
}),
390+
);
370391

371392
await server.start()
372393

373-
server.applyMiddleware({
374-
app,
375-
path: '/',
376-
})
377-
378394
const PORT = 4000
379395

380396
httpServer.listen(PORT, () =>

0 commit comments

Comments
 (0)