From 3b8b6a7395b360cacb220290076fba47f683b73b Mon Sep 17 00:00:00 2001 From: eike Date: Fri, 5 Jul 2024 12:08:43 +0200 Subject: [PATCH] Updated readme --- README.md | 71 +++++++++++++++++++++++---------------------------- src/config.ts | 2 +- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 57a4182..a4f993c 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,32 @@ -### Want full control over everything in this template? -We've created a new project called [**stackmix**](https://github.com/roxiness/stackmix). It's an experimental CLI that let's you pick and mix all features in a Routify template! Get started with `npx stackmix` - - -# Routify Starter - -Starter template for [Routify](https://github.com/roxiness/routify). - -# Get started - -To get started run: -```sh -mkdir routify-app -cd routify-app -npm init routify -``` - - -# Scripts - -Run with `npm run `, for example `npm run dev` - -| Command | Description | -|-----------|-----------------------------------------------| -| `dev` | Development (port 5000) | -| `build` | Build your app for production! | -| `preview` | Preview the built version of your app locally | - -# Want a service worker? -Checkout [vite-plugin-pwa](http://npmjs.org/vite-plugin-pwa) - -# Extra Configs -We include a few extra configs to help make it easy to ship a Routify project: - -| Config Path | Description | -|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `netlify.toml` | This is the [Netlify](https://www.netlify.com/) config, you need this when publishing to Netlify | -| `vercel.json` | This is the [Vercel](https://vercel.com/) config, you need this when publishing to Vercel | -| `public/.htaccess` | If you build your site to static using [spank](https://www.npmjs.com/package/spank) you will need this when putting your site on an apache based webserver | +# Multiplayer hangman frontend +This is a frontend for my [multiplayer-hangman-api](https://github.com/LarvenStein/multiplayer-hangman-api) project, made with svelte and routify. + +## 🔧 Running / Building +If you want to set up this frontend yourself follow these steps: + +Requierments: +- nodeJs with NPM + +1. Clone this repo + ```sh + git clone https://github.com/LarvenStein/https://github.com/LarvenStein/multiplayer-hangman-frontend.git + cd multiplayer-hangman-frontend/ + ``` +2. Install dependencies + ```sh + npm install + ``` +3. Edit `src/config.ts` according to your needs. + - You probatly want to change the `apiUrl` to a real instance of the [multiplayer-hangman-api](https://github.com/LarvenStein/multiplayer-hangman-api) +4. Now you can run or build the project + - To run it, simply execute + ```sh + npm run dev + ``` + - To build it, execute + ```sh + npm run build + ``` + - The generated HTML files should be in the `/dist` folder + +For instructions on how to set up the api server, go to the [multiplayer-hangman-api repository](https://github.com/LarvenStein/multiplayer-hangman-api). diff --git a/src/config.ts b/src/config.ts index 132a8df..faa5a3e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -export const apiUrl: string = 'http://localhost:5187/api' +export const apiUrl: string = 'http://localhost:8080/api' export const userIdKey: string = 'userId' export const roomCodeKey: string = 'roomCode' export const nicknameKey: string = 'nickname'