Spaces:
Running
Running
feat: implement core backend POS API with authentication, role-based access control, menu management, and order processing logic.
1e480b5 Download src/config/db.js from aliroohan179/face: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/spaces/aliroohan179/face/resolve/main/src/config/db.js
- Command line
-
hf download hf://spaces/aliroohan179/face/src/config/db.js
-
curl -L -o db.js https://huggingface.co/spaces/aliroohan179/face/resolve/main/src/config/db.js
352 Bytes
| const mongoose = require('mongoose'); | |
| const connectDB = async () => { | |
| try { | |
| const conn = await mongoose.connect(process.env.MONGODB_URI); | |
| console.log(`✅ MongoDB connected: ${conn.connection.host}`); | |
| } catch (err) { | |
| console.error('❌ MongoDB connection error:', err.message); | |
| process.exit(1); | |
| } | |
| }; | |
| module.exports = connectDB; | |