This commit is contained in:
Ulises Gascón
2024-02-07 12:29:54 +01:00
committed by Ulises Gascon
parent 91ba1f5054
commit 9dd233c371
143 changed files with 68070 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import { app } from './server.js'
import mongoose from 'mongoose'
const port = process.env.PORT
try {
await mongoose.connect(process.env.MONGODB_URI)
console.log('Connected to MongoDB')
app.listen(port, () => {
console.log(`Running in http://localhost:${port}`)
})
} catch (error) {
console.error(error)
}