From 5e0561df7efc3b96fced8c5dec8eef80d950e16c Mon Sep 17 00:00:00 2001 From: Preston Maness Date: Sun, 11 Jun 2023 22:40:37 -0500 Subject: [PATCH] Quickstart guidance updates --- .vscode/launch.json | 23 +++++++++++++++++++++++ README.md | 25 ++++++++++++++++--------- 2 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d0b1191 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch via yarn", + "runtimeVersion": "18", + "request": "launch", + "runtimeArgs": [ + "dev" + ], + "runtimeExecutable": "yarn", + "skipFiles": [ + "/**" + ], + "type": "node", + "env": { "DOMAIN": "localhost:3000"}, + "outputCapture": "std" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 138ea5e..81a1633 100644 --- a/README.md +++ b/README.md @@ -41,14 +41,21 @@ Please note that this project has a [Code of Conduct](https://codeberg.org/keyox To run Keyoxide locally on your machine for development: -- install either - - NodeJS - - directly from their [website](https://nodejs.org/en/), or - - using [nvm](https://github.com/nvm-sh/nvm): `nvm install --lts; nvm use --lts` - - [yarn](https://yarnpkg.com/) - - [nix](https://nixos.org/guides/install-nix.html) with - [direnv](https://direnv.net/) will install yarn and other dependencies. -- install dependencies with `npm install` or `yarn` -- run the server with `npm dev` or `yarn dev` +1. Install Node using [nvm](https://github.com/nvm-sh/nvm): `nvm install --lts` +2. Swap over to LTS: `nvm use --lts` +3. Ensure that yarn is installed: `npm install -g yarn` +4. Install node dependencies: `yarn` +5. Run the server a la `DOMAIN='localhost:3000' yarn dev` Keyoxide will now be available at [https://localhost:3000](https://localhost:3000) + +For **vscode/vscodium** development, a `launcher.json` is provided. Ensure that +the first four steps have been performed at least once to ensure the proper +node and yarn binaries are available to vscode, then load the project. The +launcher provides a "Launch via yarn" debug option that will start the project +with the appropriate version and environment variables set. The project will +then be available in a browser. + +There is also a `shell.nix` file to install Node and yarn (steps one through +three above). +