Skip to content

Commit 565fcad

Browse files
committed
(#1)
1 parent 59c9732 commit 565fcad

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PORT=3000
2+
DB_URI=mongodb://localhost:27017/todoapp

public/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
</head>
8+
<body>
9+
10+
</body>
11+
</html>

src/.env

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/app.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import express from 'express';
2+
import userRoutes from './routes/users.js';
3+
import cartRoutes from './routes/carts.js';
4+
import productRoutes from './routes/products.js';
5+
6+
const app = express();
7+
app.use(express.json());
8+
9+
app.use('/api/users', userRoutes);
10+
app.use('/api/carts', cartRoutes);
11+
app.use('/api/products', productRoutes);
12+
13+
app.listen(3000, () => {
14+
console.log('Servidor rodando na porta 3000');
15+
});

0 commit comments

Comments
 (0)