update
This commit is contained in:
parent
851012d593
commit
c271d17e0d
@ -14,7 +14,7 @@ app.use(function (req, res, next) {
|
||||
});
|
||||
|
||||
// Home Route
|
||||
app.get('/', async (req, res) => {
|
||||
app.get('/ua', async (req, res) => {
|
||||
res.json({
|
||||
message: 'Docker Service :D'
|
||||
})
|
||||
@ -73,10 +73,10 @@ const readUserAgents = async (req, res) => {
|
||||
};
|
||||
|
||||
// เส้นทางสำหรับ create user agent
|
||||
app.post("/user-agents", createUserAgent);
|
||||
app.post("/ua/user-agents", createUserAgent);
|
||||
|
||||
// เส้นทางสำหรับ read user agents
|
||||
app.get("/user-agents", readUserAgents);
|
||||
app.get("/ua/user-agents", readUserAgents);
|
||||
|
||||
const port = process.env.PORT || 8000
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ services:
|
||||
container_name: useragent
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:80
|
||||
- 8085:80
|
||||
volumes:
|
||||
# - ./front/default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./front/html:/usr/share/nginx/html
|
||||
@ -27,7 +27,7 @@ services:
|
||||
image: useragent_backend
|
||||
container_name: useragent_backend
|
||||
ports:
|
||||
- 8082:8000
|
||||
- 8086:8000
|
||||
depends_on:
|
||||
- useragent_db
|
||||
|
||||
|
||||
@ -66,7 +66,8 @@
|
||||
}
|
||||
console.log(data);
|
||||
console.log(window.location);
|
||||
fetch("http://192.168.1.108:8082/user-agents", {
|
||||
// fetch("http://192.168.1.108:8086/ua/user-agents", {
|
||||
fetch("https://ua.klxhub.com/ua/user-agents", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -76,7 +77,8 @@
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log(data);
|
||||
fetch("http://192.168.1.108:8082/user-agents", {
|
||||
// fetch("http://192.168.1.108:8086/ua/user-agents", {
|
||||
fetch("https://ua.klxhub.com/ua/user-agents", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user