mirror of https://github.com/wg-easy/wg-easy
23 changed files with 19 additions and 151 deletions
@ -1,75 +0,0 @@ |
|||
# Nuxt 3 Minimal Starter |
|||
|
|||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. |
|||
|
|||
## Setup |
|||
|
|||
Make sure to install the dependencies: |
|||
|
|||
```bash |
|||
# npm |
|||
npm install |
|||
|
|||
# pnpm |
|||
pnpm install |
|||
|
|||
# yarn |
|||
yarn install |
|||
|
|||
# bun |
|||
bun install |
|||
``` |
|||
|
|||
## Development Server |
|||
|
|||
Start the development server on `http://localhost:3000`: |
|||
|
|||
```bash |
|||
# npm |
|||
npm run dev |
|||
|
|||
# pnpm |
|||
pnpm run dev |
|||
|
|||
# yarn |
|||
yarn dev |
|||
|
|||
# bun |
|||
bun run dev |
|||
``` |
|||
|
|||
## Production |
|||
|
|||
Build the application for production: |
|||
|
|||
```bash |
|||
# npm |
|||
npm run build |
|||
|
|||
# pnpm |
|||
pnpm run build |
|||
|
|||
# yarn |
|||
yarn build |
|||
|
|||
# bun |
|||
bun run build |
|||
``` |
|||
|
|||
Locally preview production build: |
|||
|
|||
```bash |
|||
# npm |
|||
npm run preview |
|||
|
|||
# pnpm |
|||
pnpm run preview |
|||
|
|||
# yarn |
|||
yarn preview |
|||
|
|||
# bun |
|||
bun run preview |
|||
``` |
|||
|
|||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
@ -1,7 +1,6 @@ |
|||
import type { SessionConfig } from 'h3'; |
|||
|
|||
import { getRandomHex } from '~/utils/crypto'; |
|||
import packageJSON from '../package.json'; |
|||
import packageJSON from '../../package.json'; |
|||
import debug from 'debug'; |
|||
const version = packageJSON.release.version; |
|||
|
@ -0,0 +1,12 @@ |
|||
export function isValidIPv4(str: string) { |
|||
const blocks = str.split('.'); |
|||
if (blocks.length !== 4) return false; |
|||
|
|||
for (const value of blocks) { |
|||
const num = parseInt(value, 10); |
|||
if (Number.isNaN(value)) return false; |
|||
if (num < 0 || num > 255) return false; |
|||
} |
|||
|
|||
return true; |
|||
} |
@ -1,7 +1,5 @@ |
|||
import bcrypt from 'bcryptjs'; |
|||
|
|||
import { PASSWORD_HASH } from '~/utils/config'; |
|||
|
|||
/** |
|||
* Checks if `password` matches the PASSWORD_HASH. |
|||
* |
@ -1,12 +0,0 @@ |
|||
export function isValidIPv4(str) { |
|||
const blocks = str.split('.'); |
|||
if (blocks.length !== 4) return false; |
|||
|
|||
for (let value of blocks) { |
|||
value = parseInt(value, 10); |
|||
if (Number.isNaN(value)) return false; |
|||
if (value < 0 || value > 255) return false; |
|||
} |
|||
|
|||
return true; |
|||
} |
Loading…
Reference in new issue