From 5194451a3ac827778b0ff43f65cf55b86c879f78 Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Tue, 4 Mar 2025 08:47:30 -0600 Subject: [PATCH] Update README for Deno and Docker changes --- README.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 0d312cf..a3266cd 100644 --- a/README.md +++ b/README.md @@ -11,38 +11,52 @@ If you would like to suggest a feature or report a bug, or submit a patch for re ## Developing -Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) installed. - -Once you've cloned this repo, install dependencies with: +Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) (v22 or above) or [Deno](https://docs.deno.com/runtime/getting_started/installation/) (v2) installed. +Once you've cloned this repo, install dependencies with NPM: ```bash npm install ``` -then start a development server: +or with Deno: +```bash +deno install +``` + +then start a development server with Node: ```bash npm run dev ``` -or start the server and open the app in a new browser tab: +or with Deno: ```bash -npm run dev -- --open +deno task dev ``` ## Building -> We have configured Alexandria to use the static adapter. To deploy your app with a different adapter, you will need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +Alexandria is configured to run on a Node server. The [Node adapter](https://svelte.dev/docs/kit/adapter-node) works on Deno as well. -To build a production version of your app, as a static site: +To build a production version of your app with Node, use: ```bash npm run build ``` +or with Deno: +```bash +deno task build +``` + You can preview the (non-static) production build with: ```bash npm run preview ``` +or with Deno: +```bash +deno task preview +``` + ## Docker This docker container performs the build. @@ -72,22 +86,20 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS 1d83d736322f gc-alexandria "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 0.0.0.0:4174->80/tcp, [::]:4174->80/tcp gc-alexandria ``` -## Docker + Bun +## Docker + Deno -This application is configured to use the Bun runtime. A Docker container is provided to handle builds and deployments. +This application is configured to use the Deno runtime. A Docker container is provided to handle builds and deployments. -To build the app for development: +To build the app for local development: ```bash -docker build -t next-alexandria -f Dockerfile.dev . +docker build -t local-alexandria -f Dockerfile.local . ``` -To run the development build: +To run the local development build: ```bash -docker run -d -p 3040:3040 next-alexandria +docker run -d -p 3000:3000 local-alexandria ``` - - ## Testing *These tests are under development, but will run. They will later be added to the container.*