Unify the servers response
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- backend
Línea de trabajo
Comienza revisando el punto de entrada create-servers y cómo gestiona la configuración de servidores como objeto frente a como array. Se considera terminado cuando se haya acordado e implementado una única firma de respuesta para ambos modos y se haya verificado que los servidores devueltos tengan claves de dirección de forma coherente o estén normalizados de alguna otra manera.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
create-servers allows you to configure a single http server using the object syntax or multiple http server instances using an array with objects where each object the configuration for each server. While that is a nice feature to have it comes with a really painful side effect and that is that the response signature of the module changes based on the configuration. When the servers are configured using just a single object to create a single server the servers response would be:
{
http: { http server }
}
But when you are providing create-servers with an array of multiple configurations, the response signature magically changes to an array:
{
http: [
{ http server 1 },
{ http server 2 }
]
}
So in order to handle both formats, implementers of this library need to support both cases, and normalise it into workable format for their library. What I like to propose instead is that the create-servers changes it's response signature to be consistent between both configuration modes (array and object).
One way of doing this would be to return an object that is keyed on the address of the server instead of separate distinction between http, https, and then the multiple or single server that is created. So in the case of multiple servers, there would simply be more keys in the object allowing the signature to be the same.
{
80: { http server },
8080: { http server },
443: { http server }
}
- Lenguaje dominante
- JavaScript
- Estrellas
- 44
- Forks
- 19
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de http-party/create-servers
-
Use `read-ssl`Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de http-party/create-servers
Issues similares
-
feature javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
mattgodbolt/jsbeeb#1833 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
outline/outline#14529 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs verification
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 7 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
awesome-dsh-plugin/awesome-dsh-plugin#14322 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
swc-project/swc-ai-issues#414 ·