Fixed a lot of stuff
This commit is contained in:
5
app.js
5
app.js
@@ -5,6 +5,8 @@ import apiRoutes from './routes/api.js';
|
||||
import userRoutes from './routes/user.js';
|
||||
import postRoutes from './routes/posts.js';
|
||||
import commentRoutes from './routes/comments.js';
|
||||
import communityRoutes from './routes/communities.js';
|
||||
import offerRoutes from './routes/offers.js';
|
||||
|
||||
const app = express();
|
||||
const port = 3000;
|
||||
@@ -39,6 +41,9 @@ app.use('/api/user', userRoutes); // Rutas de usuarios
|
||||
app.use('/api/post', postRoutes); // Rutas de posts
|
||||
app.use('/api/comments', commentRoutes); // Rutas de comentarios
|
||||
app.use('/uploads', express.static('uploads'));
|
||||
app.use('/api/offers', express.static('uploads'));
|
||||
app.use('/api/offers', offerRoutes); // Rutas de ofertas
|
||||
app.use('/api/communities', communityRoutes); // Rutas de comunidades
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Example app listening on port ${port}`);
|
||||
|
||||
Reference in New Issue
Block a user