aa
This commit is contained in:
@@ -33,7 +33,7 @@ app.use((req, res, next) => {
|
|||||||
// Endpoint per eseguire query
|
// Endpoint per eseguire query
|
||||||
app.post('/query', async (req, res) => {
|
app.post('/query', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
console.log('Connect...')
|
console.log('Connect con config...')
|
||||||
await sql.connect(config);
|
await sql.connect(config);
|
||||||
console.log('query...', req.body.query)
|
console.log('query...', req.body.query)
|
||||||
const result = await sql.query(req.body.query);
|
const result = await sql.query(req.body.query);
|
||||||
@@ -52,4 +52,10 @@ app.post('/query', async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const PORT = process.env.SERVER_PORT || 3000;
|
const PORT = process.env.SERVER_PORT || 3000;
|
||||||
app.listen(PORT, () => console.log(`Server in ascolto sulla porta ${PORT}`));
|
// Log iniziali di avvio
|
||||||
|
console.log('Avvio del server...');
|
||||||
|
console.log(`Configurazione: utilizzo della porta ${PORT}`);
|
||||||
|
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log(`Server in ascolto sulla porta ${PORT}`);
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user