Skip to content

Instantly share code, notes, and snippets.

@kylemocode
Created March 11, 2020 09:42
Show Gist options
  • Save kylemocode/0a01c452861fda598e1ca17876351472 to your computer and use it in GitHub Desktop.
Save kylemocode/0a01c452861fda598e1ca17876351472 to your computer and use it in GitHub Desktop.
import express, { Application, Request, Response, NextFunction } from 'express';
import rateLimiter from './middleware/rateLimiter';
import bodyParser from 'body-parser';
const app: Application = express();
app.use(bodyParser.json());
app.get('/', rateLimiter, (req: Request, res: Response) => {
res.send('test');
})
app.listen(5000, () => {
console.log('server running on port 5000');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment