electric-sql / electric-sql/examples
Add `.devcontainer` config for quickstart
- Lenguaje dominante
- JavaScript
- Estrellas
- 34
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hey there,
I'm not sure if this is the right place to open a feature request for the [quickstart template](https://electric-sql.com/docs/quickstart?setup=generator), but it would be awesome if you added an optional devcontainer configuration for the quickstart. For folks interested/willing to use the devcontainer config, getting started would be a simple as
1. `npx create-electric-app@latest my-app`
2. Open `my-app` in vscode
3. Respond to vscode prompt to "reopen in devcontainer"
4. `yarn start`
For my own purposes, I created a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) config for the quickstart which [you can find here](https://github.com/jorroll/electric-sql-quickstart). I also added `pg-admin` to the devcontainer, so someone can open their browser to `http://localhost:5051` to access pgadmin and see their quickstart pg databases.
I don't expect you'll want to use the setup exactly as I have it in my [example repo](https://github.com/jorroll/electric-sql-quickstart), as I made some small changes just to get things working that make it so that I don't think the quickstart would work outside of the devcontainer (e.g. `/db/util.js` -> `fetchAppName()` now just grabs the appName env variable, which is present in the devcontainer but might not be outside of the devcontainer). But hopefully all the heavy lifting has been done for you in case you are interested in adding a devcontainer. E.g. create a new vanilla quickstart folder and diff the output vs my example repo to see the relevant changes.
Another benefit of adding the devcontainer which I haven't tested, but theoretically [Github Codespaces](https://github.com/features/codespaces) should "just work" if someone opens my example repo in a new Codespace--no downloading locally required.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empieza generando un quickstart vanilla y comparándolo mediante un diff con el ejemplo electric-sql-quickstart enlazado, centrándote en la configuración propuesta de .devcontainer y en /db/util.js. Verifica que la aplicación generada se pueda volver a abrir en un devcontainer y ejecutar con yarn start; la configuración opcional también debería conservar el comportamiento normal del quickstart fuera del contenedor.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100