Skip to content
Snippets Groups Projects
Commit 1a9814c7 authored by Diego Javier Rodriguez Uranga's avatar Diego Javier Rodriguez Uranga
Browse files

Merge branch 'dja_heroku_11_7_2024' into 'dja'

Heroku working

See merge request !12
parents 805997d9 ba052f54
No related branches found
No related tags found
1 merge request!12Heroku working
web: npm start
This diff is collapsed.
......@@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve -o --port 0",
"start": "node server.js",
"build": "ng build --configuration production",
"test": "ng test",
"lint": "ng lint",
......@@ -17,10 +17,10 @@
"@angular/core": "15.2.10",
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^15.2.10",
"@angular/platform-browser-dynamic": "^15.2.10",
"@angular/router": "^15.2.10",
"@angular/material": "^14.2.7",
"@babel/runtime": "^7.24.8",
"@ctrl/ngx-codemirror": "^6.1.0",
"@ng-bootstrap/ng-bootstrap": "^14.0.0",
......@@ -34,6 +34,7 @@
"codemirror": "^5.65.13",
"core-js": "^2.4.1",
"d3": "^7.6.1",
"express": "^4.21.1",
"flag-icon-css": "^3.2.1",
"font-awesome": "^4.7.0",
"function-plot": "https://github.com/ncamera/function-plot",
......@@ -45,6 +46,7 @@
"matefun-components": "^0.3.0",
"mathjs": "^11.3.3",
"ng2-slider-component": "^1.0.9",
"path": "^0.12.7",
"rxjs": "~7.8.0",
"tippy.js": "^1.2.0",
"tslib": "^2.3.0",
......
// const express = require("express");
// const path = require("path");
// const app = express();
// app.use(express.static(__dirname + "/dist/matefun"));
// app.get("/*", function (req, res) {
// res.sendFile(path.join(__dirname + "/dist/matefun/index.html"));
// });
// app.listen(process.env.PORT || 8080);
const express = require("express");
const path = require("path");
const app = express();
app.use(express.static(__dirname + "/dist"));
app.get("/*", function (req, res) {
res.sendFile(path.join(__dirname + "/dist/index.html"));
});
app.listen(process.env.PORT || 4200);
......@@ -2,15 +2,26 @@
// export const SERVER = 'https://matefun.math.psico.edu.uy';
// export const GHCI_URL = 'wss://matefun.math.psico.edu.uy/endpoint';
import { environment } from "environments/environment";
// fing
// export const SERVER = 'https://www.fing.edu.uy/proyectos/matefun';
// export const GHCI_URL = 'wss://www.fing.edu.uy/proyectos/matefun/endpoint';
// local
// export const SERVER = 'http://localhost:8080';
export const SELF_URL = "http://localhost:4200";
export const GHCI_URL = "ws://localhost:3000/cable";
export const SERVER = "http://localhost:3000"; // process.env.API_V2_URL;
// export const SELF_URL = "http://localhost:4200";
// export const GHCI_URL = "ws://localhost:3000/cable";
// export const SERVER = "http://localhost:3000"; // process.env.API_V2_URL;
// export const SELF_URL = "0.0.0.0:80";
// export const GHCI_URL =
// "wss://matefun-backend-1a8cbee07f23.herokuapp.com/cable";
// export const SERVER = "https://matefun-backend-1a8cbee07f23.herokuapp.com/";
export const SELF_URL = environment.SELF_URL;
export const GHCI_URL = environment.GHCI_URL;
export const SERVER = environment.SERVER;
export const SIGN_UP_URL = SERVER + "/api/v2/users";
export const LOGIN_URL = SERVER + "/api/v2/users/sign_in";
......
import { Injectable, NgZone } from "@angular/core";
import * as ActionCable from "actioncable";
import { GHCI_URL } from "../config";
@Injectable({
providedIn: "root",
......@@ -13,7 +14,8 @@ export class ActionCableService {
const client = localStorage.getItem("client");
this.consumer = ActionCable.createConsumer(
`ws://localhost:3000/cable?uid=${uid}&access-token=${accessToken}&client=${client}`
`${GHCI_URL}?uid=${uid}&access-token=${accessToken}&client=${client}`
);
}
}
``;
export const environment = {
production: true
production: true,
SELF_URL: "http://localhost:8080",
GHCI_URL: "wss://matefun-backend-1a8cbee07f23.herokuapp.com/cable",
SERVER: "https://matefun-backend-1a8cbee07f23.herokuapp.com/",
};
......@@ -5,4 +5,7 @@
export const environment = {
production: false,
SELF_URL: "0.0.0.0:80",
GHCI_URL: "ws://localhost:3000/cable",
SERVER: "http://localhost:3000",
};
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment