chartManD commited on
Commit
1c0b8df
1 Parent(s): 151b5be

correciones de ficheros y rutas

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -4
  2. back/main.js +2 -2
Dockerfile CHANGED
@@ -29,17 +29,17 @@ EXPOSE 7860
29
  RUN node -v
30
  RUN npm -v
31
 
 
 
32
  WORKDIR app
33
- COPY ./back ./app-backend
34
- COPY ./frond ./app-frond
35
  RUN ls
36
 
37
- RUN cd app-frond
38
  RUN ls
39
  RUN npm install
40
  RUN npm run build
41
 
42
- RUN cd ../app-backend
43
  RUN ls
44
  RUN npm install
45
 
 
29
  RUN node -v
30
  RUN npm -v
31
 
32
+ # COPY ./back ./app-backend
33
+ # COPY ./frond ./app-frond
34
  WORKDIR app
 
 
35
  RUN ls
36
 
37
+ RUN cd frond
38
  RUN ls
39
  RUN npm install
40
  RUN npm run build
41
 
42
+ RUN cd ../back
43
  RUN ls
44
  RUN npm install
45
 
back/main.js CHANGED
@@ -7,12 +7,12 @@ let app = express();
7
  const PORT = process.env.PORT || 7860;
8
 
9
  // Uso middleware
10
- app.use("/public", express.static(`${__dirname}/../app-frond/dist/public`));
11
  app.use(bodyParser.urlencoded({ extended: false }));
12
 
13
  // Endpoints
14
  app.get("/", (req, res) => {
15
- res.sendFile(`${__dirname}/../app-frond/dist/index.html`);
16
  });
17
 
18
  app.listen(PORT, () => {
 
7
  const PORT = process.env.PORT || 7860;
8
 
9
  // Uso middleware
10
+ app.use("/public", express.static(`${__dirname}/../frond/dist/public`));
11
  app.use(bodyParser.urlencoded({ extended: false }));
12
 
13
  // Endpoints
14
  app.get("/", (req, res) => {
15
+ res.sendFile(`${__dirname}/../frond/dist/index.html`);
16
  });
17
 
18
  app.listen(PORT, () => {