Skip to content

Commit

Permalink
Fixed Passenger Phusion support
Browse files Browse the repository at this point in the history
  • Loading branch information
chrsrns committed Oct 16, 2023
1 parent 0c40633 commit 30f2ffc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ var server = http.createServer(app);
* Listen on provided port, on all network interfaces.
*/

server.listen(port, () => {
console.log("REST API server ready at: http://localhost:3000")
}, 'passenger');
server.on('error', onError);
server.on('listening', onListening);
if (typeof (PhusionPassenger) != 'undefined') {
server.listen('passenger');
} else {
server.listen(port, () => {
console.log("REST API server ready at: http://localhost:3000")
}, 'passenger');
server.on('error', onError);
server.on('listening', onListening);
}

/**
* Normalize a port into a number, string, or false.
Expand Down
1 change: 1 addition & 0 deletions src-frontend-react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const App: React.FC = () => {

const getLoggedInStatus = () => {
const data = { refreshToken: Cookies.get("refreshToken") };
console.log(global.server_backend_url);

customFetch(`${global.server_backend_url}/backend/auth/refreshToken`, {
method: "POST",
Expand Down

0 comments on commit 30f2ffc

Please sign in to comment.