Missing ) after argument list in Centos 7 VPS Server, Running normal in my windows

28 views Asked by At

i have an error in nodejs, it says missing ) after argument list, it running well on visual studio code windows, but when i deploy to my Centos 7 VPS server , the error display, is it Operation System bug or else? what should i do bro?

this is the code

module.exports  = function(app){
const bodyParser= require('body-parser');
const database  = require('../app-config/database');
const CircularJSON = require('circular-json');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }))

    app.get('/api/user', async function (req, res) {
        var history = await database("SELECT * FROM history");
        res.status(200).json({
            status:true,
            info: "Berhasil Ambil Data",
            // jumlahuser : jumlahuser2.recordsets[0][0].jumlah,
            data: history
        })
    })
}

enter image description here

0

There are 0 answers