Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattmog committed Nov 11, 2024
2 parents f58f894 + 247eab1 commit 8f926de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const logoutCookieOptions = isProduction ? {

const allowedOrigins = isProduction ?
'https://instagram-tool.duckdns.org' :
'http://localhost:80';
'http://localhost';


const mysql = require('mysql2')
const app = express()
const port = isProduction ? 443 : 80;
const port = 8383
app.use(express.static(process.env.ROUTE))
app.use(express.json())
app.use(cookieParser())
Expand Down Expand Up @@ -305,10 +305,10 @@ if (isProduction) {
};

https.createServer(options, app).listen(port, '0.0.0.0', () => {
console.log('Server is running on https://instagram-tool.duckdns.org:443}');
console.log('Server is running on https://instagram-tool.duckdns.org:8383');
});
} else {
app.listen(port, '0.0.0.0', () => {
console.log('Server is running on http://localhost:80');
app.listen(port, 'localhost', () => {
console.log('Server is running on http://localhost:8383');
});
}
2 changes: 1 addition & 1 deletion Frontend/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const registerUsername = document.getElementById("register-username");
const loginPassword = document.getElementById("login-password");
const loginUsername = document.getElementById("login-username");
const isDevelopment = window.location.hostname === "localhost"
const baseUrl = isDevelopment ? "http://localhost" : "https://instagram-tool.duckdns.org";
const baseUrl = isDevelopment ? "http://localhost:8383" : "https://instagram-tool.duckdns.org";

// Call the function to get the base URL
loginBtn.addEventListener('click', login);
Expand Down
2 changes: 1 addition & 1 deletion Frontend/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let uploaded_file = null;

const isDevelopment = window.location.hostname === "localhost"

const baseUrl = isDevelopment ? "http://localhost" : "https://instagram-tool.duckdns.org";
const baseUrl = isDevelopment ? "http://localhost:8383" : "https://instagram-tool.duckdns.org";

getBtn.addEventListener('click', recieveInfo)
submitBtn.addEventListener('click', sendInfo)
Expand Down

0 comments on commit 8f926de

Please sign in to comment.