From 4031fa8937e229fc96f615e144e817c718e2bf7f Mon Sep 17 00:00:00 2001 From: MohammadHasan Akbari <116190942+jarqvi@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:02:51 +0330 Subject: [PATCH] chore: add development environment (#2095) * feat: add development environment * refactor: update README * refactor: update README and run yarn denoify * refactor: update CONTRIBUTING --- .devcontainer/Dockerfile | 2 ++ .devcontainer/docker-compose.yml | 18 ++++++++++++++++++ docs/CONTRIBUTING.md | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ce63a1d2..24e80296 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -10,3 +10,5 @@ RUN curl -fsSL https://bun.sh/install | bash # Install Lagon RUN yarn global add @lagon/cli esbuild + +WORKDIR /hono diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 00000000..6222a4ea --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' + +services: + hono: + build: . + container_name: hono + volumes: + - ../:/hono + networks: + - hono + command: bash + stdin_open: true + tty: true + restart: 'no' + +networks: + hono: + driver: bridge diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 126ea945..4304829c 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -36,3 +36,11 @@ It may be under the "honojs organization" and distributed in the `@honojs` names The monorepo "[honojs/middleware](https://github.com/honojs/middleware)" manages these middleware. If you want to do it, create the issue about your middleware. + +## Local Development + +``` +git clone git@github.com:honojs/hono.git && cd hono/.devcontainer && yarn install +docker compose up -d --build +docker compose exec hono bash +``` \ No newline at end of file