Remove local development README and enhance scripts for cross-platform compatibility

- Deleted `README.md` for local development setup as it was deemed unnecessary.
- Updated `setup-neon.sh`, `start-all.sh`, and `create-service.sh` scripts to source an OS helper for improved cross-platform command execution.
- Modified commands in `init-project.sh` to reflect the new script structure for starting services.
This commit is contained in:
Ho Ngoc Hai
2025-12-27 10:26:04 +07:00
parent 29c40ea681
commit 5ff8035013
6 changed files with 81 additions and 89 deletions

View File

@@ -4,6 +4,9 @@ set -e
SERVICE_NAME=$1
# Source OS helper for cross-platform commands
source "$(dirname "$0")/os-helper.sh"
# EN: Validate arguments
# VI: Xác thực tham số
if [ -z "$SERVICE_NAME" ]; then
@@ -30,13 +33,11 @@ cp -r services/_template "$SERVICE_DIR"
# EN: Update package.json
# VI: Cập nhật package.json
cd "$SERVICE_DIR"
sed -i.bak "s/@goodgo\/service-template/@goodgo\/$SERVICE_NAME/g" package.json
rm package.json.bak
run_sed "s/@goodgo\/service-template/@goodgo\/$SERVICE_NAME/g" package.json
# EN: Update .env.example
# VI: Cập nhật .env.example
sed -i.bak "s/SERVICE_NAME=service-name/SERVICE_NAME=$SERVICE_NAME/g" .env.example 2>/dev/null || true
rm .env.example.bak 2>/dev/null || true
run_sed "s/SERVICE_NAME=service-name/SERVICE_NAME=$SERVICE_NAME/g" .env.example
# EN: Update Dockerfile port if needed
# VI: Cập nhật port Dockerfile nếu cần