Devops Omar
Devops Omar
RRailway
Created by Devops Omar on 10/19/2023 in #✋|help
Error deploying backend project
thank you so much
14 replies
RRailway
Created by Devops Omar on 10/19/2023 in #✋|help
Error deploying backend project
I'll check the link and comment tomorrow. I'm tired
14 replies
RRailway
Created by Devops Omar on 10/19/2023 in #✋|help
Error deploying backend project
const express = require("express");
const helmet = require("helmet");
const cors = require("cors");
require("dotenv").config();
const router = require("./routes");
const errorHandler = require("./utils/errorHandler");

// Esta es nuestra aplicación
const app = express();
//


// Middlewares
app.use(express.json());
app.use(helmet({
contentSecurityPolicy: {
defaultSrc: "*",
},
}));
// app.use(helmet());

app.use(cors());
//
app.use("/api/v1", router);

app.use(errorHandler);

module.exports = app;
const express = require("express");
const helmet = require("helmet");
const cors = require("cors");
require("dotenv").config();
const router = require("./routes");
const errorHandler = require("./utils/errorHandler");

// Esta es nuestra aplicación
const app = express();
//


// Middlewares
app.use(express.json());
app.use(helmet({
contentSecurityPolicy: {
defaultSrc: "*",
},
}));
// app.use(helmet());

app.use(cors());
//
app.use("/api/v1", router);

app.use(errorHandler);

module.exports = app;
14 replies
RRailway
Created by Devops Omar on 10/19/2023 in #✋|help
Error deploying backend project
here app.use(express.json()); app.use(helmet({ contentSecurityPolicy: { defaultSrc: "*", },
14 replies
RRailway
Created by Devops Omar on 10/19/2023 in #✋|help
Error deploying backend project
I already did it, in the node.js app file and it doesn't work. const express = require("express"); const helmet = require("helmet"); const cors = require("cors"); require("dotenv").config(); const router = require("./routes"); const errorHandler = require("./utils/errorHandler"); // Esta es nuestra aplicación const app = express(); // // Middlewares app.use(express.json()); app.use(helmet({ contentSecurityPolicy: { defaultSrc: "*", }, })); // app.use(helmet()); app.use(cors()); // app.use("/api/v1", router); app.use(errorHandler); module.exports = app;
14 replies