Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
512 B
9
Indexable
Never
// CAMINHO: BACKEND/SRC/APP.JS

const express = require('express');

const productsRouter = require('./routes/products.router');
const salesRouter = require('./routes/sales.router');

const app = express();
app.use(express.json());
app.use(productsRouter);
app.use(salesRouter);

// não remova esse endpoint, é para o avaliador funcionar
app.get('/', (_req, res) => {
  res.json({ status: 'Store Manager UP!' });
});

app.use('/products', productsRouter);
app.use('/sales', salesRouter);

module.exports = app;
Leave a Comment