Skip to content

Commit

Permalink
Merge pull request #207 from Arquisoft/Despliegue
Browse files Browse the repository at this point in the history
Despliegue
  • Loading branch information
mariolada authored May 1, 2022
2 parents eb1b10e + 9266a79 commit 3ac6367
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pruebaDeploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI for ASW2122
on:
push:
branch: [master]
release:
types: [published]

jobs:
docker-push-webapp:
Expand Down
3 changes: 3 additions & 0 deletions restapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM node:16.13.1
LABEL org.opencontainers.image.source https://github.com/Arquisoft/dede_es2a
COPY . /app
WORKDIR /app


#Install the dependencies
RUN npm install

CMD [ "npm", "start" ]
6 changes: 3 additions & 3 deletions restapi/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { pedidoRouter } from "./routes/pedido.router";
import { usuarioRouter } from "./routes/usuario.router";

const app: Application = express();
const port: number = 5000;
const port = process.env.PORT || 5000;


require('dotenv').config()
let bd = require('./modules/gestorDB')
let {config} = require('./modules/cloudinary');

const options: cors.CorsOptions = {
origin: ['http://localhost:3000']
//origin: ['https://dede-es2a-webapp.herokuapp.com']
//origin: ['http://localhost:3000']
origin: ['https://dede-es2a-webapp.herokuapp.com']
};

const metricsMiddleware:RequestHandler = promBundle({includeMethod: true});
Expand Down
2 changes: 1 addition & 1 deletion webapp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import express,{Application} from 'express';
//setting the option module to commonjs

var app: Application = express()
const port: number = 3000;
const port = process.env.PORT || 3000;

app.use(express.static('build'))

Expand Down

0 comments on commit 3ac6367

Please sign in to comment.