Created
July 3, 2022 20:59
-
-
Save iMichaelOwolabi/943146dc8e4a8eb40d3fc3c8f618a612 to your computer and use it in GitHub Desktop.
init server setup event mngr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import { config } from 'dotenv'; | |
config(); | |
const app = express(); | |
app.use(express.json()); | |
const port = process.env.PORT ?? 3000; | |
app.get('/api/v1', (req, res) => { | |
res.send('Welcome to the event management platform built on redis'); | |
}); | |
app.listen(port, () => { | |
console.log(`Server running on: http://localhost:${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment