WIP
This commit is contained in:
committed by
Ulises Gascon
parent
91ba1f5054
commit
9dd233c371
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user