Skip to content

Instantly share code, notes, and snippets.

@iMichaelOwolabi
Created July 3, 2022 20:59
Show Gist options
  • Save iMichaelOwolabi/943146dc8e4a8eb40d3fc3c8f618a612 to your computer and use it in GitHub Desktop.
Save iMichaelOwolabi/943146dc8e4a8eb40d3fc3c8f618a612 to your computer and use it in GitHub Desktop.
init server setup event mngr
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