Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // app.js
- const express = require('express');
- const connectDB = require('./config/db');
- const app = express();
- // Connect Database
- connectDB();
- app.get('/', (req, res) => res.send('Hello world!'));
- const port = process.env.PORT || 8082;
- app.listen(port, () => console.log(`Server running on port ${port}`));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement