diff --git a/README.md b/README.md index 3f180da..ab07eee 100644 --- a/README.md +++ b/README.md @@ -6,29 +6,33 @@

## 🤝🏼 Agrega tu articulo + Pasos: + - Haz fork de este proyecto - Crea un archivo Markdown en la carpeta `articles` - Escribe tu articulo con este formato - ```md - --- - title: Mi Articulo - description: La descripcion de mi articulo - author: RustLangES - github_user: RustLangES - date: 2023-09-17 - tags: - - rust - - comunidad - # Aqui compartes tus redes sociales - social: - github: https://github.com/RustLangES - # twitter: - # website: - --- - - El Contenido de tu articulo - ``` + + ```md + --- + title: Mi Articulo + description: La descripcion de mi articulo + author: RustLangES + github_user: RustLangES + date: 2023-09-17 + tags: + - rust + - comunidad + # Aqui compartes tus redes sociales + social: + github: https://github.com/RustLangES + # twitter: + # website: + --- + + El Contenido de tu articulo + ``` + - Haz una PR con tus cambios - Espera nuestra revision - Disfruta de tu articulo publicado 🎊 @@ -38,15 +42,27 @@ Pasos: # Desarrollo ## Requisitos + - [Rust](https://rust-lang.org/tools/install) - [NodeJs](https://nodejs.org) - [cargo-watch](https://crates.io/crates/cargo-watch) ## Ejecutar + ``` # generar la web cargo watch -x run --shell "npx tailwindcss -i ./input.css -o ./out/output.css && cargo run" # lanzar un servidor web provicional con python3 -python3 -m http.server -d out +python3 -m http.server -d out +``` + +``` +# En cualquier linux distro + +## Iniciar cargo watch y http server +./server start + +## Apagar ambos servicios +./server stop ``` diff --git a/server b/server new file mode 100755 index 0000000..d418159 --- /dev/null +++ b/server @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "$1" = "start" ] +then + nohup cargo watch -x run --shell "npx tailwindcss -i ./input.css -o ./out/output.css && cargo run" & + nohup python3 -m http.server -d out & +fi + +if [ "$1" = "stop" ] +then + + kill -9 $(sudo netstat -npl --inet | awk '/:8000/' | awk -F "[ /]+" '{print $7}') + pkill cargo-watch +fi