Spaces:
Build error
Build error
correciones de ficheros y rutas
Browse files- Dockerfile +4 -4
- 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
|
| 38 |
RUN ls
|
| 39 |
RUN npm install
|
| 40 |
RUN npm run build
|
| 41 |
|
| 42 |
-
RUN cd ../
|
| 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}/../
|
| 11 |
app.use(bodyParser.urlencoded({ extended: false }));
|
| 12 |
|
| 13 |
// Endpoints
|
| 14 |
app.get("/", (req, res) => {
|
| 15 |
-
res.sendFile(`${__dirname}/../
|
| 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, () => {
|