Browse Source

feat: change port to 4173

See: https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#default-preview-port
pull/1518/head
Dominik Pschenitschni 5 months ago
parent
commit
98cb14a86c
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
  1. 2
      .drone.yml
  2. 2
      cypress.json
  3. 2
      package.json
  4. 2
      scripts/serve-dist.js
  5. 2
      vite.config.ts

2
.drone.yml

@ -120,7 +120,7 @@ steps:
from_secret: cypress_project_key
commands:
- sed -i 's/localhost/api/g' dist/index.html
- yarn serve:dist & npx wait-on http://localhost:5000
- yarn serve:dist & npx wait-on http://localhost:4173
- yarn test:frontend --browser chrome --record
depends_on:
- dependencies

2
cypress.json

@ -1,5 +1,5 @@
{
"baseUrl": "http://localhost:5000",
"baseUrl": "http://localhost:4173",
"env": {
"API_URL": "http://localhost:3456/api/v1",
"TEST_SECRET": "averyLongSecretToSe33dtheDB"

2
package.json

@ -5,7 +5,7 @@
"scripts": {
"serve": "vite",
"serve:dist-dev": "node scripts/serve-dist.js",
"serve:dist": "vite preview",
"serve:dist": "vite preview --port 4173",
"build": "vite build && workbox copyLibraries dist/",
"build:modern-only": "BUILD_MODERN_ONLY=true vite build && workbox copyLibraries dist/",
"build:dev": "vite build -m development --outDir dist-dev/",

2
scripts/serve-dist.js

@ -3,7 +3,7 @@ const express = require('express')
const app = express()
const p = path.join(__dirname, '..', 'dist-dev')
const port = 5000
const port = 4173
app.use(express.static(p))
// Handle urls set by the frontend

2
vite.config.ts

@ -130,7 +130,7 @@ export default defineConfig({
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
},
server: {
port: 5000,
port: 4173,
strictPort: true,
},
build: {

Loading…
Cancel
Save