-1
The first time I created this, I had no problem, I did an update on my server.js recently (which is the line app.use("/api", orcamento)
) and went to update her...
By clicking on Executar a instalação do NPM
makes the installation of the items of the package.json
(had a new item too that was the nodemailer
)
By clicking on Run JS Script
a message says it ran without errors, but when opening the application URL, the image appears.
Man server.js
var express = require("express");
var bodyParser = require("body-parser")
var compression = require('compression');
var helmet = require('helmet');
var post = require("./routes/post.js")
var usuario = require("./routes/usuario.js")
var categoria = require("./routes/categoria.js")
var orcamento = require("./routes/orcamento.js")
var cors = require("cors")
var port = 3000
var app = express();
app.use(cors())
app.use(bodyParser.json({limit: '50mb'}))
app.use(bodyParser.urlencoded({limit: '50mb',extended: false}))
app.use(compression());
app.use(helmet());
app.use("/api", post)
app.use("/api", usuario)
app.use("/api", categoria)
app.use("/api", orcamento)
app.listen(port, function () {
console.log("Server started on port: " + port);
})
EDIT
I tried to go putting line by line in my server.js and running the script la in cPanel, the problem is when you put the lines
var post = require("./routes/post.js")
var usuario = require("./routes/usuario.js")
var categoria = require("./routes/categoria.js")
var orcamento = require("./routes/orcamento.js")
Someone knows how to help me?