Skip to content

Commit

Permalink
ip edit
Browse files Browse the repository at this point in the history
  • Loading branch information
csy056 committed Jul 17, 2024
1 parent b4500bf commit c95e618
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# REACT_APP_BE_PROD=http://13.54.234.18:8000
# # http://localhost:8000
# REACT_APP_PHOTO_BACKEND=http://127.0.0.1:5000
REACT_APP_BACKEND=http://127.0.0.1:8000
REACT_APP_BACKEND=http://3.26.21.10:8000
# http://localhost:8000
REACT_APP_BE_PROD=http://127.0.0.1:8000
REACT_APP_BE_PROD=http://3.26.21.10:8000
# http://localhost:8000
REACT_APP_PHOTO_BACKEND=http://127.0.0.1:5000
REACT_APP_DEVICE_NUMBER=APP01
Expand Down
4 changes: 2 additions & 2 deletions app/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# REACT_APP_BE_PROD=http://13.54.234.18:8000
# # # http://localhost:8000
# REACT_APP_PHOTO_BACKEND=http://127.0.0.1:5000
REACT_APP_BACKEND=http://127.0.0.1:8000
REACT_APP_BACKEND=http://3.26.21.10:8000
# # http://localhost:8000
REACT_APP_BE_PROD=http://127.0.0.1:8000
REACT_APP_BE_PROD=http://3.26.21.10:8000
# # http://localhost:8000
REACT_APP_PHOTO_BACKEND=http://127.0.0.1:5000
# csy
Expand Down
4 changes: 2 additions & 2 deletions app/src/api/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import axios from "axios";
// export const BaseURL = "http://127.0.0.1:5000"
// export const videoFeedUrl=`http://127.0.0.1:5000/video_feed`//Photo.js live view url
const audioBaseURL="http://127.0.0.1:8001"
const checkBaseUrl="http://127.0.0.1:9000"
const OriginBaseURL="http://127.0.0.1:8000"
const checkBaseUrl="http://3.26.21.10:9000"
const OriginBaseURL="http://3.26.21.10:8000"
export const startCashUrl="http://127.0.0.1:8002/api/start/"
export const BaseURL = "http://127.0.0.1:5000"
export const videoFeedUrl=`http://127.0.0.1:5000/video_feed`//Photo.js live view url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Example:
"https://example.com",
"https://sub.example.com",
"http://localhost:8080",
"http://127.0.0.1:9000",
"http://3.26.21.10:9000",
]

Previously this setting was called ``CORS_ORIGIN_WHITELIST``, which still works as an alias, with the new name taking precedence.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ That's it, we're done!

./manage.py runserver

You can now open the API in your browser at `http://127.0.0.1:8000/`, and view your new 'users' API. If you use the `Login` control in the top right corner you'll also be able to add, create and delete users from the system.
You can now open the API in your browser at `http://3.26.21.10:8000/`, and view your new 'users' API. If you use the `Login` control in the top right corner you'll also be able to add, create and delete users from the system.

You can also interact with the API using command line tools such as [`curl`](https://curl.haxx.se/). For example, to list the users endpoint:

$ curl -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/
$ curl -H 'Accept: application/json; indent=4' -u admin:password http://3.26.21.10:8000/users/
[
{
"url": "http://127.0.0.1:8000/users/1/",
"url": "http://3.26.21.10:8000/users/1/",
"username": "admin",
"email": "[email protected]",
"is_staff": true,
Expand All @@ -197,9 +197,9 @@ You can also interact with the API using command line tools such as [`curl`](htt

Or to create a new user:

$ curl -X POST -d username=new -d [email protected] -d is_staff=false -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/
$ curl -X POST -d username=new -d [email protected] -d is_staff=false -H 'Accept: application/json; indent=4' -u admin:password http://3.26.21.10:8000/users/
{
"url": "http://127.0.0.1:8000/users/2/",
"url": "http://3.26.21.10:8000/users/2/",
"username": "new",
"email": "[email protected]",
"is_staff": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ That's it, we're done!

./manage.py runserver

You can now open the API in your browser at `http://127.0.0.1:8000/`, and view your new 'users' API. If you use the `Login` control in the top right corner you'll also be able to add, create and delete users from the system.
You can now open the API in your browser at `http://3.26.21.10:8000/`, and view your new 'users' API. If you use the `Login` control in the top right corner you'll also be able to add, create and delete users from the system.

You can also interact with the API using command line tools such as [`curl`](https://curl.haxx.se/). For example, to list the users endpoint:

$ curl -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/
$ curl -H 'Accept: application/json; indent=4' -u admin:password http://3.26.21.10:8000/users/
[
{
"url": "http://127.0.0.1:8000/users/1/",
"url": "http://3.26.21.10:8000/users/1/",
"username": "admin",
"email": "[email protected]",
"is_staff": true,
Expand All @@ -197,9 +197,9 @@ You can also interact with the API using command line tools such as [`curl`](htt

Or to create a new user:

$ curl -X POST -d username=new -d [email protected] -d is_staff=false -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/
$ curl -X POST -d username=new -d [email protected] -d is_staff=false -H 'Accept: application/json; indent=4' -u admin:password http://3.26.21.10:8000/users/
{
"url": "http://127.0.0.1:8000/users/2/",
"url": "http://3.26.21.10:8000/users/2/",
"username": "new",
"email": "[email protected]",
"is_staff": false,
Expand Down
2 changes: 1 addition & 1 deletion photomong-admin/src/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BACKEND_API=http://127.0.0.1:9000
BACKEND_API=http://3.26.21.10:9000
2 changes: 1 addition & 1 deletion photomong-admin/src/apis/device.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import { axiosInstance } from "../config/config";
import axios from "axios";
//Env variable
export const BaseURL = "http://127.0.0.1:9000";
export const BaseURL = "http://3.26.21.10:9000";
axios.defaults.withCredentials = true;
// Created an axios instance adding our api BaseURL
export const axiosInstance = axios.create({
Expand Down

0 comments on commit c95e618

Please sign in to comment.