Add Cloud Agent dev environment (PHP server for book examples) - #1
Draft
caions wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Caio Nascimento dos Santos <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Configura um ambiente de desenvolvimento para os exemplos do livro Head First JavaScript. O repositório é uma coleção de páginas estáticas (HTML/JS/CSS) com alguns backends em PHP (
ch02,ch07) e um fluxo AJAX + SimpleXML (ch12). Não havia sistema de build nem gerenciador de pacotes.O que foi adicionado
.cursor/environment.jsoninstall: executa.cursor/install.sh(idempotente).terminals: servidorphp -S 0.0.0.0:8000 -t .servindo todos os capítulos em http://localhost:8000.ports: expõe a porta8000..cursor/install.sh: instala de forma idempotentephp-cliephp-xml(necessário para oSimpleXMLElementdoch12), pulando quando o PHP já está presente.O ambiente é gerenciado pelo repositório (o
.cursor/environment.jsonversionado tem a maior precedência) e é portável: não depende de nenhum snapshot pessoal — oinstall.shprovisiona o PHP na imagem padrão do Cloud Agent.Validação
VM local
ch01/irock.html)ch01/rock.png)ch02/donuts.php(POST)ch07/bannerocity.php(POST)ch12/addblogentry.phpblog.xml(restaurado após teste)ch02/donuts.htmlBuilds de ambiente (draft)
bld-...451c2422install.shdo zerobld-...b12df9e0install.shPHP: 8.3.6 (cli) com extensão SimpleXML.