правка порта

main
Пилипенко Андрей Борисович 1 month ago
parent 6ac828e2cf
commit 84da23519c

@ -82,7 +82,7 @@ This example uses the Web Server Gateway Interface (WSGI) with Django to enable
```bash
python manage.py collectstatic
python manage.py runserver 8090
python manage.py runserver 8091
docker rmi -f <image_id>
docker compose down && docker compose build --no-cache && docker compose up
@ -95,4 +95,4 @@ ssh first@192.168.1.100
less +G /var/lib/docker/containers/<container_id>/<container_id>-json.log
```
Your Django application is now available at `http://localhost:8090`.
Your Django application is now available at `http://localhost:8091`.

@ -2,7 +2,7 @@ import unittest
import requests
import uuid
BASE_URL = "http://localhost:8090"
BASE_URL = "http://localhost:8091"
def get_error_message(response: requests.Response) -> str:

@ -23,5 +23,8 @@ export default defineConfig([
ecmaVersion: 2020,
globals: globals.browser,
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
},
},
])

@ -5,6 +5,7 @@
"description": "Game Shop",
"type": "module",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",

@ -1,5 +1,5 @@
const DEV_URL = '/dev_api'
const PROD_URL = 'https://shop.softwarrior.ru:8090'
const PROD_URL = 'https://shop.softwarrior.ru:8091'
export type ResponseData = {
error?: string
@ -7,12 +7,11 @@ export type ResponseData = {
}
type HeaderType = HeadersInit & {
authorization: string
authorization?: string
}
const DEFAULT_HEADERS: HeaderType = {
'content-type': 'application/json',
authorization: '',
}
export interface NetworkApi {
@ -48,7 +47,7 @@ class Network implements NetworkApi {
if (value) {
this._headers.authorization = `Bearer ${value}`
} else {
this._headers.authorization = ''
this._headers.authorization = undefined
}
this._token = value
}

@ -8,7 +8,7 @@ export default defineConfig({
port: 5173,
proxy: {
'/dev_api': {
target: 'http://127.0.0.1:8090',
target: 'http://localhost:8091',
changeOrigin: true,
secure: false,
rewrite: path => path.replace(/^\/dev_api/, ''),
@ -23,7 +23,7 @@ export default defineConfig({
req.method,
req.url,
'→',
'http://127.0.0.1:8090' + req?.url?.replace('/dev_api', '')
'http://localhost:8091' + req?.url?.replace('/dev_api', '')
)
})
},

Loading…
Cancel
Save